Skip to main content
GET
/
api
/
token
cURL
curl "https://api.cometapi.com/api/token/?p=1&page_size=20" \
  -H "Authorization: your-access-token"
{
  "success": true,
  "message": "",
  "data": {
    "page": 1,
    "page_size": 20,
    "total": 1,
    "items": [
      {
        "id": 1234,
        "user_id": 5678,
        "key": "<COMETAPI_KEY>",
        "status": 1,
        "name": "production",
        "created_time": 1766102400,
        "accessed_time": 1766102400,
        "expired_time": -1,
        "remain_quota": 100000,
        "unlimited_quota": false,
        "model_limits_enabled": false,
        "model_limits": "",
        "allow_ips": null,
        "used_quota": 0,
        "group": "",
        "cross_group_retry": false
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint to list API keys that belong to the authenticated CometAPI account. The newest keys are returned first.
Generate a personal access token at Console → Personal Settings, then send it as the raw Authorization header value. Do not prefix it with Bearer.

Pagination

Query parameterDescription
pPage number. Defaults to 1.
page_sizeItems per page. Values above 100 are capped at 100.

API key status

StatusMeaning
1Enabled
2Disabled
3Expired
4Exhausted

Returned fields

FieldTypeDescription
idintegerNumeric API key ID. Use this value with Get a single API key, Update an API key, and Delete an API key.
keystringAPI key value returned by the management API. Treat it as a secret and use it as Authorization: Bearer <COMETAPI_KEY> for model requests.
statusintegerOperational status. Only 1 means the key is enabled for model requests.
namestringUser-readable display name for the key.
created_timeintegerUnix timestamp in seconds when the key was created.
accessed_timeintegerUnix timestamp in seconds when the key was last used.
expired_timeintegerUnix timestamp in seconds when the key expires. -1 means no expiration.
remain_quotaintegerRemaining quota in CometAPI internal quota units.
used_quotaintegerQuota already consumed by this key in CometAPI internal quota units.
unlimited_quotabooleanWhether the key bypasses remaining-quota checks.
model_limits_enabledbooleanWhether model restrictions are active for this key.
model_limitsstringComma-separated model IDs allowed by this key when model_limits_enabled is true. Empty means no configured model list.
allow_ipsstring or nullIP allowlist as one newline-separated string. Each entry can be a single IPv4 address, single IPv6 address, IPv4 CIDR, or IPv6 CIDR. null or "" means no IP restriction.
groupstringAccount group restriction. Empty means no explicit group restriction.
cross_group_retrybooleanWhether cross-group retry is enabled for automatic group routing.

Authorizations

Authorization
string
header
required

Personal access token copied from CometAPI Console > Personal Settings. Send the raw token value; do not prefix it with Bearer.

Query Parameters

p
integer
default:1

Page number to return. Defaults to 1.

Required range: x >= 1
page_size
integer
default:20

Number of keys per page. Values above 100 are capped at 100 by the backend.

Required range: 1 <= x <= 100

Response

200 - application/json

Paginated API key list.

success
boolean
required
message
string
required
data
object
required