allmodels.ioAudio Docs
API ReferenceAccount

Check balance (OpenRouter-compatible)

GET/oai/credits

Returns the balance of the account associated with your API key in OpenRouter's GET /credits format, for chat-completions clients that read a provider balance from the base URL (https://api.allmodels.io/oai/credits). Configure such clients to display data.total_credits - data.total_usage. Authenticate with Authorization: Bearer <apiKey>. You can call this endpoint even when the balance is zero. For the full breakdown, use GET /account/balance.

Authorization

BearerAuth
AuthorizationBearer <token>

Tenant key supplied as the Authorization Bearer token.

In: header

Response Body

application/json

application/json

application/json

fetch("https://example.com/oai/credits", {  method: "GET"})
{  "data": {    "total_credits": 1.75,    "total_usage": 0  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}
{  "error": {    "message": "string",    "type": "string",    "param": "string",    "code": "string"  }}