OpenAI Billing Format
Last updated October 29, 2026
Compatible with the legacy OpenAI billing API, for balance queries from new-api, one-api, NextChat and similar tools.
Compatible with the legacy OpenAI billing API. Used in the following cases:
- channel balance queries from new-api when this platform is connected as an OpenAI channel;
- channel balance queries from one-api;
- balance display in clients such as NextChat and Cherry Studio.
Both endpoints accept paths with or without the /v1 prefix.
https://gateway.amux.ai/v1/dashboard/billing/subscriptionAuthorization
headerAuthorizationstringRequiredBearer <your Amux AI key> An Amux key created in the console. If you lose it, you can view it again on the keys page.
Response
200responseBilling subscription.
401responseMissing or invalid key.
https://gateway.amux.ai/v1/dashboard/billing/usageAuthorization
headerAuthorizationstringRequiredBearer <your Amux AI key> An Amux key created in the console. If you lose it, you can view it again on the keys page.
Request
start_datestringAccepted for compatibility; ignored.
end_datestringAccepted for compatibility; ignored.
Response
200responseUsage for the current period.
401responseMissing or invalid key.
Balance calculation
These tools calculate the balance as follows:
balance = hard_limit_usd − total_usage / 100
The values returned make the result equal to the spendable amount of the current key:
total_usage: workspace spend for the current period, in cents;hard_limit_usd: the spendable amount plus the amount intotal_usage, in USD.
If the current key is not permitted to view workspace data (keys owned by regular organization members), total_usage is 0, hard_limit is null, and quota is omitted. If the spendable amount is unlimited, hard_limit_usd is 100000000, which matches how new-api represents unlimited tokens.
The two endpoints are requested separately. If a charge occurs between the two requests, the result is slightly lower than the actual spendable amount.
Configuring new-api
Select OpenAI as the channel type, set the Base URL to https://gateway.amux.ai, and enter your API key for this platform. After saving, update the balance from the channel list.
curl https://gateway.amux.ai/v1/dashboard/billing/subscription \
-H "Authorization: Bearer $AMUX_API_KEY"{
"object": "billing_subscription",
"has_payment_method": false,
"soft_limit_usd": 60.75,
"hard_limit_usd": 60.75,
"system_hard_limit_usd": 60.75,
"hard_limit": 10000,
"system_hard_limit": 10000,
"period": "month",
"quota": {
"total": {
"limit": "100",
"used": "12.5",
"remaining": "87.5",
"resetsAt": "2026-11-01T00:00:00.000Z"
},
"day": {
"limit": "100",
"used": "12.5",
"remaining": "87.5",
"resetsAt": "2026-11-01T00:00:00.000Z"
},
"week": {
"limit": "100",
"used": "12.5",
"remaining": "87.5",
"resetsAt": "2026-11-01T00:00:00.000Z"
},
"month": {
"limit": "100",
"used": "12.5",
"remaining": "87.5",
"resetsAt": "2026-11-01T00:00:00.000Z"
}
}
}