Platform notice: all DeepSeek models are now live. New users receive trial credits on sign-up.
Api reference

Query account balance

Query the account balance, gift balance, frozen amount and the quota usage of the current API Key.

GET /api/v1/balance

Returns the balance breakdown of the account that owns the API Key, plus the quota usage of the current Key. Read-only: no billing, no rate-limit consumption.

Auth: Authorization: Bearer sk-tp-...

FieldTypeDescription
objectstringAlways balance
currencystringAlways CNY
total_creditsnumberTotal balance = principal + gift (yuan)
balance_creditsnumberPrincipal balance = total − gift
gift_creditsnumberGift balance, already included in the total
frozen_creditsnumberAmount frozen by in-flight tasks / requests; becomes a real charge once settled
available_creditsnumberAvailable balance = total − frozen
used_creditsnumberCumulative spend of the account
key.namestringName of the current API Key
key.quota_limitnumber / nullQuota of the current Key subtree; null means unlimited
key.usednumberUsed quota of the current Key subtree

Notes:

  • The balance is account-level; the key section only reflects the current Key's own quota.
  • Charges deduct principal first, then gift.
  • Async tasks (e.g. video) freeze the amount on submit; the freeze is charged on success and released on failure / timeout / cancellation.
  • When available_credits is 0, new requests return 402.
curl https://api.openruler.ai/api/v1/balance \
  -H "Authorization: Bearer sk-tp-..."

On this page

OpenRuler