Get Account Balance
/v1/billing/balanceChoose the scope and credential first
- One key's usage/budget: call
GET /v1/keywith that inference API key. Readusage,limit_remaining, andlimit_reset. This is a key spending budget, not the enterprise wallet or credit balance. - Enterprise wallet and credit: call
GET /enterprise/v1/billing/balancewith aMANAGEMENTkey scoped only totenant:billing:read. Inference and PROVISIONING keys cannot use it. - Account charges/request reconciliation: existing
GET /v1/billingandGET /v1/billing/requests/{request_id}use an inference key or signed-in JWT. Management keys cannot call these/v1endpoints. Recorded charges and remaining balance are different metrics. - Legacy account balance:
GET /v1/billing/balanceremains compatible and reports account funds, not the calling key's remaining budget. Prefer the Enterprise endpoint for new enterprise balance monitoring.
Enterprise API guide · Get enterprise balance
Postpaid funding semantics
All amounts are USD. Under POSTPAY, positive wallet top-up funds are spent first and the remainder uses enterprise credit. Promotional Credit/vouchers are neither spent nor included in the total.
credit_limit_usd: approved credit limit.current_exposure_usd: credit used in the current open billing period.credit_remaining_usd:max(credit_limit_usd - current_exposure_usd, 0).credit_available: remaining enterprise credit under POSTPAY; available vouchers under PREPAY. These meanings are different.total_spendable:max(wallet_available, 0) + credit_remaining_usdfor POSTPAY; the existingwallet_available + credit_availablefor PREPAY.
Historical unpaid invoices are not deducted from remaining credit a second time. Balances are snapshots of recorded billing data, not real-time reservations. Exhausted credit, key limits, account spend protection or other policies can still reject requests. Exhausted credit blocks new POSTPAY calls even if wallet funds remain, so the total is not a guarantee of callable capacity.
Authentication
Use an inference API key or signed-in JWT. MANAGEMENT / PROVISIONING keys cannot use this path. Enterprise members resolve both wallet and credit to the enterprise billing owner.
Response
codeinteger200 on success
dataobjectdata.currencystringCurrency: usd
data.payment_modestringPREPAY or POSTPAY
data.wallet_availablenumberAvailable wallet balance, possibly negative
data.wallet_frozennumberFrozen wallet balance
data.credit_availablenumberPREPAY vouchers; POSTPAY remaining credit
data.credit_limit_usdnumberCredit limit; 0 for PREPAY
data.credit_remaining_usdnumberRemaining credit; 0 for PREPAY
data.current_exposure_usdnumberOpen-period credit usage; 0 for PREPAY
data.total_spendablenumberAccount total according to payment mode
data.checked_atstringUTC ISO-8601 observation time