Retrieve one CometAPI API key record by ID for the authenticated account.
curl https://api.cometapi.com/api/token/1234 \
-H "Authorization: your-access-token"{
"success": true,
"message": "",
"data": {
"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
}
}Use this endpoint to retrieve one API key record by ID.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.
Authorization header value. Do not prefix it with Bearer.id path parameter is the numeric key ID returned by List API keys.
| Status | Meaning |
|---|---|
1 | Enabled |
2 | Disabled |
3 | Expired |
4 | Exhausted |
| Field | Type | Description |
|---|---|---|
id | integer | Numeric API key ID. Use this value with Update an API key and Delete an API key. |
key | string | API key value returned by the management API. Treat it as a secret and use it as Authorization: Bearer <COMETAPI_KEY> for model requests. |
status | integer | Operational status. Only 1 means the key is enabled for model requests. |
name | string | User-readable display name for the key. |
created_time | integer | Unix timestamp in seconds when the key was created. |
accessed_time | integer | Unix timestamp in seconds when the key was last used. |
expired_time | integer | Unix timestamp in seconds when the key expires. -1 means no expiration. |
remain_quota | integer | Remaining quota in CometAPI internal quota units. |
used_quota | integer | Quota already consumed by this key in CometAPI internal quota units. |
unlimited_quota | boolean | Whether the key bypasses remaining-quota checks. |
model_limits_enabled | boolean | Whether model restrictions are active for this key. |
model_limits | string | Comma-separated model IDs allowed by this key when model_limits_enabled is true. Empty means no configured model list. |
allow_ips | string or null | IP 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. |
group | string | Account group restriction. Empty means no explicit group restriction. |
cross_group_retry | boolean | Whether cross-group retry is enabled for automatic group routing. |
Personal access token copied from CometAPI Console > Personal Settings. Send the raw token value; do not prefix it with Bearer.
Numeric API key ID returned by the list endpoint.
curl https://api.cometapi.com/api/token/1234 \
-H "Authorization: your-access-token"{
"success": true,
"message": "",
"data": {
"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
}
}