Skip to content
English

Account Balance

GET /v1/account/balance returns your account-level balance: remaining credit and total usage in USD. Use it to build balance monitoring, recharge reminders, or internal ops dashboards, so you find out about a low balance before requests start failing.

Any valid API key on your account works. The key only serves as credentials — an exhausted key can still query the balance, which is exactly what you want when monitoring a running out balance.

Terminal window
curl https://api.hiapi.ai/v1/account/balance \
-H "Authorization: Bearer $HIAPI_API_KEY"

No request body and no query parameters.

{"object":"account_balance","balance_usd":9.98,"used_usd":194.56,"currency":"USD"}
FieldTypeDescription
objectstringAlways account_balance.
balance_usdnumberRemaining account balance in USD.
used_usdnumberTotal usage consumed by the account since signup, in USD.
currencystringAlways USD. The unit is fixed and does not depend on site display settings.

Balances are computed from the platform’s internal quota unit; minor floating-point rounding is expected.

HTTPMeaning
401Missing, invalid, disabled, or expired API key.
403Your IP is not in the key’s allowed IP list.
429Rate limit exceeded: 60 requests per minute per account. Retry with backoff.
500Internal error, such as a database or billing configuration failure.

The balance read is free: it never consumes quota, and it is rate-limited independently of generation requests.

HiAPI also exposes OpenAI-compatible endpoints for backward compatibility:

  • GET /v1/dashboard/billing/subscription — reports the calling key’s own quota limit
  • GET /v1/dashboard/billing/usage — the calling key’s usage

Those follow the key-level quota and use OpenAI’s legacy field names, which is confusing for account balance monitoring. For new integrations, prefer /v1/account/balance.