sub2api Format
Last updated October 29, 2026
Compatible with the sub2api usage API, for new-api instances connected as a "Sub2API" channel and tools such as cc-switch.
Compatible with the sub2api usage API. Used in the following cases:
- channel balance queries from new-api when this platform is connected as a "Sub2API" channel;
- balance queries from tools such as cc-switch.
https://gateway.amux.ai/v1/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.
Response
200responseBalance.
401responseMissing or invalid key.
Modes
mode | Meaning | Balance fields returned |
|---|---|---|
unrestricted | Limited only by the account balance | remaining, balance |
quota_limited | Limited by key or workspace spend limits | remaining |
remaining is the spendable amount of the current key, in USD.
If the spendable amount is unlimited, remaining and balance are omitted. sub2api uses -1 to indicate an unlimited balance, but new-api treats -1 as an actual balance, so this platform omits both fields instead.
Limitations
sub2api queries balances only for OAuth accounts and keys from certain official vendors. When this platform is added to sub2api as an API key account, sub2api does not query its balance.
curl https://gateway.amux.ai/v1/usage \
-H "Authorization: Bearer $AMUX_API_KEY"{
"isValid": true,
"mode": "unrestricted",
"planName": "Amux",
"unit": "USD",
"remaining": 48.25,
"balance": 48.25
}