Skip to content

Scopes ​

Every Admin Key capability must be ticked explicitly; anything not ticked is refused.

Admin Keys are deny by default: only endpoints covered by a scope you explicitly ticked can be called. Everything else is refused.

The five scopes ​

ScopeWhat it allowsTicked by default
account:readView account profile and balanceYes
logs:readList and analyse call logs, and export themYes
usage:readExport usage analytics by time, model and other dimensionsYes
keys:readView the API key list and single key details, without plaintextNo
keys:writeCreate, update and delete API keys, still without plaintextNo

All three default scopes are read-only. Write access must be ticked by hand, and the interface warns you when you do.

Endpoints covered by each scope ​

account:read ​

MethodPathDescription
GET/api/user/selfAccount profile, including balance

logs:read ​

MethodPathDescription
GET/api/log/selfLog details as a paginated JSON list
GET/api/log/self/countNumber of log entries (request count)
GET/api/log/self/statCall statistics (spend, RPM, TPM)
GET/api/log/self/stream-exportExport log details as CSV

usage:read ​

MethodPathDescription
GET/api/data/self/pivot/stream-exportExport usage analytics as CSV

keys:read ​

MethodPathDescription
GET/api/token/API key list
GET/api/token/{id}Single key details

keys:write ​

MethodPathDescription
POST/api/token/Create a key
PUT/api/token/Update a key
DELETE/api/token/{id}Delete a key

Full parameters and responses are in the API reference.

Refusal responses ​

There are two kinds of refusal, and the difference is whether ticking another scope fixes it.

Missing scope ​

The endpoint is available to Admin Keys, but this key does not have the required scope. Edit the key and tick it.

json
{
  "success": false,
  "code": "admin_key_scope_missing",
  "message": "The admin key is missing the required scope: keys:read"
}

The message names the scope that is missing.

Endpoint not available ​

This endpoint is not available to Admin Keys at all. No scope will help — sign in to the console instead.

json
{
  "success": false,
  "code": "admin_key_scope_forbidden",
  "message": "This endpoint is not available to admin keys, sign in to the console instead"
}

Admin, agent and supplier endpoints return the same code with wording that says so explicitly.

TIP

Using an Admin Key against /v1/chat/completions returns a dedicated message rather than a vague "invalid token". Seeing it means you reached for the wrong credential type.