List account credit transactions
/account/transactionsLists organization-level credit events without payment-provider identifiers, reference IDs, or arbitrary metadata. Per-request usage debits are available from the activity endpoint instead.
Authorization
BearerAuth Tenant key supplied as the Authorization Bearer token.
In: header
Query Parameters
Number of records to return, from 1 to 100. Defaults to 50.
^([1-9]|[1-9]\d|100)$Opaque cursor returned as next_cursor by the previous page.
1 <= length <= 512Response Body
application/json
application/json
application/json
application/json
application/json
application/json
const response = await fetch("https://api.allmodels.io/account/transactions?limit=50", { headers: { Authorization: `Bearer ${process.env.ALLMODELS_API_KEY}` }});if (!response.ok) throw new Error(`AllModels request failed: ${response.status}`);console.log(await response.json());import osimport requestsresponse = requests.get( "https://api.allmodels.io/account/transactions?limit=50", headers={"Authorization": f"Bearer {os.environ['ALLMODELS_API_KEY']}"}, timeout=30,)response.raise_for_status()print(response.json())curl "https://api.allmodels.io/account/transactions?limit=50" \ -H "Authorization: Bearer $ALLMODELS_API_KEY"{ "items": [ { "id": "string", "type": "top_up", "amount_credits": 1250000, "amount_usd": 1.25, "balance_after_credits": 1250000, "balance_after_usd": 1.25, "created_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string"}{ "error": "invalid_request"}{ "error": "invalid_request"}{ "error": "invalid_request"}{ "error": "invalid_request"}{ "error": "invalid_request"}List API-key activity GET
Lists individual requests made with the authenticating API key, newest first. Activity is asynchronously persisted. Treat pagination cursors as opaque.
Check balance (OpenRouter-compatible) GET
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`.
