API Credits Balance Endpoint

Check your credits balance and usage with GET /api/v1/credits. OpenRouter-compatible.

GET/api/v1/credits

What This Endpoint Returns

Returns the account-level credits balance and total spend. This is the simplest way to check whether a TheRouter.ai account has remaining funds. Use it programmatically in CI scripts, billing dashboards, or agent loops that need to verify spend headroom before sending a batch of requests.

Management Key Required
This endpoint requires a management API key (sk-mgmt-... prefix). Regular routing keys will receive a 403 Forbidden response.

Request Example

bash
curl https://api.therouter.ai/api/v1/credits \
  -H "Authorization: Bearer sk-mgmt-..."

Response

json
{
  "data": {
    "total_credits": 950.5,
    "total_usage": 49.5
  }
}
This endpoint stays credits-only
total_credits and total_usage are reported in TheRouter's internal credits unit and are not changing — this keeps the endpoint byte-for-byte OpenRouter-compatible. If you need a USD-denominated balance, use GET /v1/customer/credits instead: it returns the same balance plus a usd_balance sibling object (current, paid, promotional, low_balance_threshold, all in USD) alongside current_period, lifetime, and quotas. The credit-denominated fields on that endpoint are kept for backward compatibility; the usd_* siblings are the fields to build new USD-facing UI against.
Help & contact