Sign-up and API keys are open. Paid top-ups open soon.What changed
Docs menu

API reference, Console keys

Read one API key

View as Markdown

GET/v1/console/keys/{key_id}operation id getKey

Authentication. Console session cookie (__Host-dex_session). State-changing routes also need the x-dex-csrf header.

Parameters

key_idpath ยท KeyIdrequired
  • pattern ^key_[0-9A-HJKMNP-TV-Z]{26}$

Responses

200The key, without its secret.

Headers: x-request-id

idKeyIdrequired
  • pattern ^key_[0-9A-HJKMNP-TV-Z]{26}$
objectstringrequired
  • always "api_key"
namestringrequired
modestringrequired
  • one of "live", "test"
prefixstringrequired
The mode prefix plus the first 4 characters, for recognising the key.
  • pattern ^dex_(live|test)_[0-9A-Za-z]{4}$
scopesarray of Scoperequired
  • each item: one of "decide", "usage:read", "balance:read"
limitsKeyLimitsrequired
  • no other fields
limits.requests_per_minuteinteger
  • 1 to 600
limits.tokens_per_minuteinteger
  • 1,000 to 600,000
limits.concurrencyinteger
  • 1 to 32
created_atstringrequired
  • format date-time
last_used_atstring | nullrequired
  • format date-time
expires_atstring | nullrequired
  • format date-time
revoked_atstring | nullrequired
  • format date-time
401Missing, unknown, revoked or expired credentials.

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

403The credentials are valid but not allowed to do this (missing scope, suspended account or failed CSRF check).

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

404The model, key or route does not exist, or the model version is retired.

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

500An unexpected error. Any charge was refunded. Retry with the same idempotency key.

Headers: x-request-id, x-client-request-id

Error envelope. See Errors for every type and code.

503maintenance: the console's database, sign-in or payments are unavailable for a moment. Retry after retry-after. Nothing was changed.

Headers: x-request-id, retry-after

Error envelope. See Errors for every type and code.

Examples

Illustrative values. Examples show the shape of requests and responses; the numbers in them are not measured results.

Response: A live key limited below the account caps

{
  "id": "key_01M54VQCG06CQ643DZVMXXQKFB",
  "object": "api_key",
  "name": "support-router",
  "mode": "live",
  "prefix": "dex_live_Q7mK",
  "scopes": [
    "decide",
    "usage:read",
    "balance:read"
  ],
  "limits": {
    "requests_per_minute": 120,
    "tokens_per_minute": 120000,
    "concurrency": 8
  },
  "created_at": "2026-10-17T08:30:00Z",
  "last_used_at": "2026-10-20T11:59:41Z",
  "expires_at": null,
  "revoked_at": null
}