API reference · API
The balance this key spends
GET/v1/creditsAPI key
For a client that holds only the key: whether the account has deposited, the spendable balance with holds taken off, and for an account that never deposited the free allowance left. An organization key reads the organization's shared balance. Takes the read scope, which every key minted with the defaults holds.
Answer 200
The credit standing.
Headers: x-antimatter-request-id, x-request-id
| Field | Type | What it is |
|---|---|---|
| object | "credits" | |
| account | string | One of "personal", "organization". |
| funded | boolean | True once the account has deposited; until then it spends a free allowance. |
| balance_micros | integer or null | The spendable balance, holds on requests in flight taken off. Null until funded. |
| balance | number or null | The same, in dollars. |
| held_micros | integer | What requests in flight hold right now. |
| free_allowance | object or null | An account that never deposited: its lifetime free allowance. Null otherwise. |
| free_allowance. | integer | |
| free_allowance. | integer | |
| free_allowance. | integer | |
| free_allowance. | number | |
| free_allowance. | boolean | |
| currency | "USD" |
Errors
- 401OpenAI shaped error.
- 403OpenAI shaped error.
- 429Rate limited, or a spent budget or spend cap. The type distinguishes rate_limit_error, policy_exceeded, and spend_cap_exceeded.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.