Post managekeys
GET /v3/manage/keys (list, manage:read) and POST /v3/manage/keys (mint an inference
key, manage:write). Org-scoped through principals_in_org. Balance is pending-adjusted per
page on the list; the created secret is returned ONCE in the 201 and never by a read.
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.
The token name
1 - 200sandbox_api_token- Sandboxapi_token- Back
sandbox_api_token, api_token Weither to use the balance field or not.
Response
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.
The token name
200sandbox_api_token- Sandboxapi_token- Back
sandbox_api_token, api_token Weither to use the balance field or not.