Token quota usage
Check the current API Key's quota, model restrictions, and expiry.
“Token” here means API Key. Results belong only to the Key used in the request; quota is not the Token count of a single model generation.
Query API Key quota
Send the current API Key in the Header, with or without the sk- prefix:
curl --location --request GET "https://api.agtcloud.cn/api/usage/token" \
-H "Authorization: Bearer your-api-key"View quota
Success uses a code/message/data envelope. Quota is in data; data.object is always token_usage.
| Field | Meaning |
|---|---|
total_granted | Total granted quota, equal to used plus remaining quota. |
total_used | Used quota. |
total_available | Remaining available quota. |
View restrictions and expiry
| Field | Meaning |
|---|---|
unlimited_quota | When true, the Key has no quota limit |
model_limits_enabled | Whether model restrictions are enabled. |
model_limits | Allowed-model map: model IDs are keys and boolean values indicate permission. |
expires_at | Unix expiry timestamp in seconds; 0 means never expires |
API reference
See Query API Key quota for the full request, response examples, and authentication errors.