Skip to main content
PATCH
cURL

Path Parameters

key_id
string<uuid>
required

Body

An org's inference key as the management plane exposes it. Never the secret or its hash — only non-secret metadata, addressed by the stable key_id (id).

balance is the pending-adjusted LIVE sub-limit, not the raw settled column. For a credit-ledger-enrolled org the stored Token.balance lags by whatever the batched rollup has not settled, so a management admin must be shown available, not settled (the shipped display-vs-accounting doctrine, mirrored from utils/check_credits.py and manage_user_account_serializers). The un-settled deltas (≤ 0, so they ADD) are batch-fetched once per page by the view and passed in context["pending"]; a non-ledger org simply has none, so the add is a no-op.

id is null for an un-migrated legacy key (one still stored as a JWT, no key_id yet); such a key is listed but not addressable via /keys/{id} until it is regenerated onto the hashed scheme.

name
string

The token name

Required string length: 1 - 200
token_type
enum<string>
  • sandbox_api_token - Sandbox
  • api_token - Back
Available options:
sandbox_api_token,
api_token
active_balance
boolean

Weither to use the balance field or not.

expire_time
string<date-time> | null
revoked_at
string<date-time> | null

Response

200 - application/json

An org's inference key as the management plane exposes it. Never the secret or its hash — only non-secret metadata, addressed by the stable key_id (id).

balance is the pending-adjusted LIVE sub-limit, not the raw settled column. For a credit-ledger-enrolled org the stored Token.balance lags by whatever the batched rollup has not settled, so a management admin must be shown available, not settled (the shipped display-vs-accounting doctrine, mirrored from utils/check_credits.py and manage_user_account_serializers). The un-settled deltas (≤ 0, so they ADD) are batch-fetched once per page by the view and passed in context["pending"]; a non-ledger org simply has none, so the add is a no-op.

id is null for an un-migrated legacy key (one still stored as a JWT, no key_id yet); such a key is listed but not addressable via /keys/{id} until it is regenerated onto the hashed scheme.

id
string<uuid>
required
read-only
name
string
required

The token name

Maximum string length: 200
member
string<email>
required
read-only
masked
string
required
read-only
balance
string
required
read-only
revoked
boolean
required
read-only
token_type
enum<string>
  • sandbox_api_token - Sandbox
  • api_token - Back
Available options:
sandbox_api_token,
api_token
active_balance
boolean

Weither to use the balance field or not.

expire_time
string<date-time> | null
revoked_at
string<date-time> | null