API

Account

Credit balance of the key owner.

Credits are spent from the account that owns the key. See Billing & retention.

MethodPathSummary
GET/v1/account/balanceCredit balance.

#GET /v1/account/balance

Credit balance.

Authentication: Authorization: Key <key>.

credits is null on an unlimited plan (unlimited: true).

#Responses

StatusDescriptionBody
200Balanceobject
401UNAUTHENTICATED (missing/invalid/revoked key) or KEY_SESSION_EXPIRED (sign in to aitopia.ai to reactivate the key)Error
429RATE_LIMIT, RUN_LIMITED or QUEUE_LIMIT_EXCEEDED (see retry_after_seconds and the Retry-After header)Error
500INTERNAL_ERROR (an unexpected server error)Error

#Example

Request
curl "https://api-live.aitopia.ai/v1/account/balance" \
  -H "Authorization: Key $AITOPIA_KEY"
Response 200
{
  "credits": 940,
  "unlimited": false,
  "paid_credits": 900,
  "daily_credits_remaining": 40,
  "daily_allowance": 50
}