Check Remaining Credits

Use your API key to check how many credits this key can still use. This is useful for confirming your balance before submitting a large batch of tasks, or for logging usage periodically.

GET /api/account/credits
X-Api-Key: sk-live-xxxx
  • Only X-Api-Key is required; no other parameters are needed.
  • Queries don't consume credits, but they do count toward the rate limit (see Authentication).

Response fields

Field Description
credit_type Key type: paid or trial, corresponding to keys starting with sk-live- and sk-test- respectively
balance Remaining credits (integer). Its meaning depends on credit_type; see below.
expires_at When the credits expire (ISO 8601). Paid credits don't expire, so this is always null; for trial keys it's the expiration time of the bound credit grant.
as_of When this data was generated (ISO 8601). The balance changes in real time with charges and refunds; this value reflects the moment of the query.

balance is the account's paid credit balance, shared by all paid keys on the same account. expires_at is always null.

Trial key (credit_type = trial)

  • balance is how much is left in the trial credit grant bound to this key. Trial keys are charged only from this grant (see Credits and Billing), so this is exactly how much this key can still use; other trial credit grants on the account aren't included.
  • expires_at is the expiration time of this grant and always has a value. When the grant is used up, balance is 0 and expires_at stays the same.
  • After the grant expires, any API call with this key (including this one) returns 401, not balance: 0.

Example responses

The values below are for reference only.

Paid key:

{
  "credit_type": "paid",
  "balance": 12000,
  "expires_at": null,
  "as_of": "2026-10-08T04:30:00.000000Z"
}

Trial key:

{
  "credit_type": "trial",
  "balance": 500,
  "expires_at": "2026-10-15T00:00:00.000000Z",
  "as_of": "2026-10-08T04:30:00.000000Z"
}

Errors

Status code Cause
401 X-Api-Key missing, key doesn't exist or has been revoked, or the trial key's credit grant has expired (for message contents, see Authentication)
429 Rate limit exceeded