CometAPI Account Balance Query API Usage Instructions
https://query.cometapi.com/user/quota
key
(the API key you registered on the CometAPI platform)
**Request Example**
https://query.cometapi.com/user/quota/?key=sk-xxx
## Response Body Example
```json
{
"username": "example_user",
"total_quota": 2105.234088,
"total_used_quota": 21.065912,
"request_count": 1221,
"keys": [
{
"name": "tts_test",
"remain_quota": 8.93872,
"used_quota": 2.099206
},
{
"name": "concurrency_test",
"remain_quota": 10,
"used_quota": 0
},
{
"name": "mj_test",
"remain_quota": 8.55,
"used_quota": 1.45
},
{
"name": "test_key",
"remain_quota": 999999999,
"used_quota": -1
}
]
}
Field Descriptions#
Field Name | Description |
---|
username | Username |
total_quota | Current account balance (Unit: USD) |
total_used_quota | Total consumed quota of the account |
request_count | Total number of requests |
keys.name | API Key name |
keys.remain_quota | Remaining quota of the key (-1 indicates unlimited quota) |
keys.used_quota | Used quota of the key (-1 indicates unlimited quota) |
Security Recommendations#
🔑 Key Usage Suggestions
It is recommended to generate a dedicated token for querying purposes:Set the balance to 0, granting only query permissions
Token acquisition as shown in the image:
Modified at 2025-05-16 07:32:11