Account
Query Token Balance
Query the remaining and used quota of the current API Key
GET
Documentation Index
Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
Use this file to discover all available pages before exploring further.
- Query the remaining and used quota of the current API Key
- Monitor single token usage
- CORS cross-origin support
- Real-time balance monitoring
1 USD = 200 credits.
Authorizations
All endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:
Endpoints
Response
Whether the request was successful
Error message (only returned on failure)
Token remaining balance (returned on success). Returns
-1 when unlimited_quota is trueToken used balance (returned on success)
Token remaining credits (returned on success). Credits are calculated with
1 USD = 200 creditsToken used credits (returned on success)
Credit conversion rate. Currently returns
200Whether the token has unlimited quota.
true means unlimited, false means limitedUse Cases
- Monitor consumption of a single API Key
- Display current token balance in your application
- Set up balance alerts when balance falls below threshold
Balance Unit InformationThe unit of the balance value depends on system configuration:
- USD - US Dollars
- CNY - Chinese Yuan
- Tokens - Token count
remain_credits and used_credits when you need credit values. These fields always use 1 USD = 200 credits and do not depend on the balance display configuration.Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| No Authorization header | Authorization header not provided | Add Authorization: Bearer sk-xxxxx header |
| Failed to get token info | Token doesn’t exist or has been deleted | Check if the token key is correct |