Regular Key Self-Service Query
Only accepts a Regular Key and returns the owning account's current total balance and the current Key's balance info.
The following Regular Key states still allow the query and return 200:
- manually disabled;
- expired;
- limit exhausted;
- waiting for subscription to take effect.
Deleted, forged, or unrecognizable keys return 401 invalid_api_key; a disabled account returns 403 account_disabled.
Request Parameters: None
Response Example
{
"object": "self_balance",
"currency": "USD",
"as_of": "2026-08-08T06:30:00Z",
"account": {
"total_balance": "850",
"paid_balance": null,
"free_balance": null,
"breakdown_status": "unavailable"
},
"key": {
"id": "key_01JPRODUCTION",
"name": "Production Server",
"key_type": "regular",
"disabled": false,
"manually_disabled": false,
"limit": "200",
"limit_reset": "monthly",
"quota_scope": "usage",
"period": {
"start": "2026-07-21T08:30:00Z",
"end_exclusive": "2026-08-21T08:30:00Z"
},
"consumed_this_period": "85.5",
"consumed_today": "2.3",
"key_limit_remaining": "114.5",
"remaining": "114.5",
"effective_remaining": "114.5",
"usage_pct": "42.75",
"status": "active",
"status_reason": null
}
}
The self-service endpoint does not return the following sensitive or administrative data:
- Account cumulative consumption
total_consumed; - Key lifetime consumption
consumed.all_time; - Per-model consumption
consumed.by_model; - Any information about other keys.
A Management Key calling this endpoint always returns 403 forbidden_scope.
Even when a key has been manually disabled, expired, has exhausted its limit, or is waiting for a subscription to take effect, it can still query its own balance and returns 200. The self-service endpoint does not return account cumulative consumption, key lifetime consumption, per-model consumption, or information about other keys.
For general request conventions, field definitions, and error codes, see the Balance Query API overview.