Query account balance

Query the available account balance with an authorized model API token.

GET /api/usage/token/

Auth: {'type': 'bearer', 'prefix': 'sk-'}

Send Authorization: Bearer <MODEL_API_KEY> with no query parameters or request body. In Token Management, turn on Allow account balance queries. The permission is off by default. A token without this permission receives HTTP 403.

Headers

AuthorizationstringrequiredModel API token in Bearer <MODEL_API_KEY> format.

Responses

Example

curl --request GET "https://api.router.ai/api/usage/token/" \
  --header "Authorization: Bearer ${MODEL_API_KEY}"

Read data.user_quota.total_available. It is an integer and can be zero or negative. Divide by 500,000 to convert to USD. data.unlimited_quota is always true for compatibility with New API balance refresh. Tokens under one account share a rolling limit of 10 requests per 60 seconds. For HTTP 429, wait as directed by Retry-After.

API reference