Account
Credit balance of the key owner.
Credits are spent from the account that owns the key. See Billing & retention.
| Method | Path | Summary |
|---|---|---|
GET | /v1/account/balance | Credit balance. |
#GET /v1/account/balance
Credit balance.
Authentication: Authorization: Key <key>.
credits is null on an unlimited plan (unlimited: true).
#Responses
| Status | Description | Body |
|---|---|---|
200 | Balance | object |
401 | UNAUTHENTICATED (missing/invalid/revoked key) or KEY_SESSION_EXPIRED (sign in to aitopia.ai to reactivate the key) | Error |
429 | RATE_LIMIT, RUN_LIMITED or QUEUE_LIMIT_EXCEEDED (see retry_after_seconds and the Retry-After header) | Error |
500 | INTERNAL_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
}