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.
Request
Section titled “Request”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.
curl https://api.hiapi.ai/v1/account/balance \ -H "Authorization: Bearer $HIAPI_API_KEY"No request body and no query parameters.
Response
Section titled “Response”{"object":"account_balance","balance_usd":9.98,"used_usd":194.56,"currency":"USD"}| Field | Type | Description |
|---|---|---|
object | string | Always account_balance. |
balance_usd | number | Remaining account balance in USD. |
used_usd | number | Total usage consumed by the account since signup, in USD. |
currency | string | Always 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.
Errors
Section titled “Errors”| HTTP | Meaning |
|---|---|
401 | Missing, invalid, disabled, or expired API key. |
403 | Your IP is not in the key’s allowed IP list. |
429 | Rate limit exceeded: 60 requests per minute per account. Retry with backoff. |
500 | Internal 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.
Difference from billing endpoints
Section titled “Difference from billing endpoints”HiAPI also exposes OpenAI-compatible endpoints for backward compatibility:
GET /v1/dashboard/billing/subscription— reports the calling key’s own quota limitGET /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.