Balance and Billing
Query the account balance, key quota and period budget with an API key.
Use this endpoint to check the account balance outside the console. Only an sk- API key created in the console is required; no sign-in session is needed.
Query the account balance
GET https://token.easyapi.com/v1/billing/balance
Authorization: Bearer sk-xxxxxxxx
If the key is device-bound (for example created through EasyAPI Skill / CLI), send the same device fingerprint as well:
X-EasyAPI-Client-Id: <64 lowercase hex characters>
Request example
curl https://token.easyapi.com/v1/billing/balance \
-H "Authorization: Bearer sk-xxxxxxxx"
Response example
{
"success": true,
"data": {
"wallet": { "amount": 128.6, "currency": "CNY" },
"token": {
"amount": 28.6,
"currency": "CNY",
"unlimited": false,
"total_granted": 50,
"total_used": 21.4
},
"budget": { "amount": 10, "currency": "CNY", "period": "daily" }
}
}
Fields
| Field | Type | Description |
|---|---|---|
wallet | object | Account balance; team keys return the team wallet balance |
wallet.amount | number | Available balance, already converted to the display currency |
wallet.currency | string | Currency code, such as CNY, USD or a custom currency symbol |
token | object | Quota of the current key |
token.amount | number | Remaining quota of the key |
token.unlimited | boolean | Whether the key has unlimited quota |
token.total_granted | number | Total granted quota of the key (remaining + used) |
token.total_used | number | Total used quota of the key |
budget | object | Returned only when the key has a period budget |
budget.amount | number | Remaining budget for the current period |
budget.period | string | daily or monthly |
Status codes
| HTTP status | Description |
|---|---|
200 | Success |
401 | Missing or invalid API key |
403 | Key disabled or expired, IP not in the allowlist, or device binding mismatch (client_binding_mismatch) |
500 | Wallet or budget is temporarily unavailable; retry later |
Notes
- Amounts are already converted to the display currency of the console (CNY on this site). Do not convert again with
500,000 quota = 1 USD; use thecurrencyfield for the actual unit. - For unlimited keys,
token.amountis meaningless; read the account balance fromwalletinstead. - An exhausted key (zero balance) still returns
200, so clients can show an "insufficient balance" state.