List API keys
Keys are never returned in full — only their identity and last four. Creation stays in the console deliberately: a leaked key that can mint more keys is a leaked account.
Keys are never returned in full — only their identity and last four. Creation stays in the console deliberately: a leaked key that can mint more keys is a leaked account.
Authorization
apiKey API key from the console, ak_....
In: header
Query Parameters
1 <= value <= 100Response Body
application/json
application/json
curl -X GET "https://example.com/api_keys"{ "data": [ { "id": "string", "object": "api_key", "name": "string", "last4": "string", "revoked": true, "last_used_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string"}Retrieve usage for this account GET
What this account has consumed and what remains. A hosted generation can cost more than one unit: a project generating TypeScript, Python, and Go consumes three, so callers that would otherwise discover the limit by receiving a 402 can check first.
Revoke an API key DELETE
Idempotent: revoking an already-revoked key returns the same body, so a rotation script that re-runs does not have to special-case having already succeeded.