Skip to main content
GET
/
api
/
usage
/
token
cURL
curl https://api.cometapi.com/api/usage/token \
  -H "Authorization: Bearer $COMETAPI_KEY"
{
  "code": true,
  "message": "ok",
  "data": {
    "object": "token_usage",
    "name": "production",
    "total_granted": 150000,
    "total_used": 50000,
    "total_available": 100000,
    "unlimited_quota": false,
    "model_limits": {
      "gpt-4.1": true
    },
    "model_limits_enabled": true,
    "expires_at": 0
  }
}
Use this endpoint to inspect the CometAPI API key used by the request. It returns usage and quota fields for the bearer key, not an account-level list of all keys.
This endpoint uses a CometAPI API key: Authorization: Bearer $COMETAPI_KEY. API key management endpoints use a separate personal access token.

Returned fields

FieldTypeDescription
namestringDisplay name of the API key.
total_grantedintegerTotal quota assigned to this key in CometAPI internal quota units.
total_usedintegerQuota consumed by this key in CometAPI internal quota units.
total_availableintegerRemaining quota available to this key in CometAPI internal quota units.
unlimited_quotabooleanWhether the key bypasses remaining-quota checks.
model_limitsobjectModel restrictions for this key, keyed by model ID. Empty when no model limits are configured.
model_limits_enabledbooleanWhether model restrictions are active for this key.
expires_atintegerUnix timestamp in seconds when the key expires. 0 means no expiration in this usage response.

Authorizations

Authorization
string
header
required

CometAPI API key used for model requests. Send it as Authorization: Bearer $COMETAPI_KEY.

Response

200 - application/json

Current API key usage details.

code
boolean
required

Whether the request succeeded.

message
string
required

Status message.

data
object
required