Skip to main content

Query a Specific Key Balance

Only accepts a Management Key. key_id must be the public ID of a non-deleted Regular Key under the current account.

Request Parameters: None (key_id is in the path)

Response Example

{
"object": "key_balance",
"currency": "USD",
"as_of": "2026-08-08T06:30:00Z",
"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",
"consumed": {
"all_time": "850",
"this_period": "85.5",
"today": "2.3",
"by_model": [
{
"model": "gpt-4.1",
"cost": "45"
}
],
"complete": true,
"retention_start": "2026-01-01T00:00:00Z"
},
"key_limit_remaining": "114.5",
"remaining": "114.5",
"effective_remaining": "114.5",
"usage_pct": "42.75",
"status": "active",
"status_reason": null
}
}

All fields of a single key are placed in the key sub-object; key_id, consumed, and remaining are not repeated at the top level of the response.

404 Semantics

To prevent resource probing, a unified 404 key_not_found is returned when the specified key does not exist, has been deleted, or belongs to another account, without distinguishing the specific reason.

Related Endpoints

For general request conventions, field definitions, and error codes, see the Balance Query API overview.

Online Service