SurfacedBySurfacedBy Docs
DocumentationConsoleReference

Keys

Mint, list, and revoke Console API keys.

Ask an AI:Open in ChatGPTOpen in Claude

Every Console request is authenticated with a key minted from this resource. Keys prefixed sk_live_ debit real credits; keys prefixed sk_test_ return fixture responses and never consume balance. The list endpoint returns prefix, created timestamp, last-used timestamp, and revoked status, never the plaintext. The mint endpoint returns the plaintext once, in the response body, and never again.

Revocation is instant. A revoked key fails with 401 key_revoked on the next request.

GET
/keys
/keys

Query Parameters

is_testIs Test

Header Parameters

X-API-KeyX-Api-Key

curl -X GET "https://example.com/keys?is_test=true" \
  -H "X-API-Key: string"

Successful Response

null

POST
/keys
/keys

Request Body

application/jsonRequired

[key: string]any

Header Parameters

X-API-KeyX-Api-Key

curl -X POST "https://example.com/keys" \
  -H "X-API-Key: string" \
  -H "Content-Type: application/json" \
  -d '{}'

Successful Response

null

DELETE
/keys/{key_id}
/keys/{key_id}

Path Parameters

key_id
Required
Key Id

Header Parameters

X-API-KeyX-Api-Key

curl -X DELETE "https://example.com/keys/string" \
  -H "X-API-Key: string"

Successful Response

null