AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help

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.

FieldMeaning
total_grantedTotal granted quota, equal to used plus remaining quota.
total_usedUsed quota.
total_availableRemaining available quota.

View restrictions and expiry

FieldMeaning
unlimited_quotaWhen true, the Key has no quota limit
model_limits_enabledWhether model restrictions are enabled.
model_limitsAllowed-model map: model IDs are keys and boolean values indicate permission.
expires_atUnix expiry timestamp in seconds; 0 means never expires

API reference

See Query API Key quota for the full request, response examples, and authentication errors.

On this page