API reference
Balance
/v1/balanceReturns the account balance and what the calling API key can still spend, in USD. Free and read-only: no model call, nothing billed. Keys that are used up or expired can still call it; only disabled keys are refused.
#Request parameters
AuthorizationheaderrequiredBearer sk-YOUR_KEY. There is no body and no query parameter.
balance is the whole account wallet and can go below zero after a large job settles. available is what this key can spend right now: the smaller of balance and the key’s own remaining limit, never below zero. key.remaining is null when the key has no limit of its own; expires_at 0 means it never expires.
B2B callers can poll it before sending work and warn their team when available runs low. With request signing on, sign it like any other call with that key, using the path /v1/balance.
#Related errors
- 401Missing, invalid or disabled key — or, with request signing on, a missing or wrong signature.
- 403The account is disabled.
- 500The balance could not be read. Retry after a few seconds.
Still stuck?
Send us the request ID or the error message and we will look into it.