API 金鑰
列出 API 金鑰
列出已驗證帳戶的 CometAPI API 金鑰,並支援分頁。
GET
cURL
使用此端點可列出屬於已驗證 CometAPI 帳戶的 API 金鑰。系統會優先回傳最新建立的金鑰。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.
請先在 Console → Personal Settings 產生 personal access token,然後將它作為原始
Authorization 標頭值送出。不要加上 Bearer 前綴。分頁
| 查詢參數 | 說明 |
|---|---|
p | 頁碼。預設為 1。 |
page_size | 每頁項目數。超過 100 的值會被限制為 100。 |
API 金鑰狀態
| 狀態 | 含義 |
|---|---|
1 | 已啟用 |
2 | 已停用 |
3 | 已過期 |
4 | 已用盡 |
回傳欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
id | integer | 數值型 API 金鑰 ID。可將此值用於取得單一 API 金鑰、更新 API 金鑰與刪除 API 金鑰。 |
key | string | 由管理 API 回傳的 API 金鑰值。請將其視為機密,並在模型請求中以 Authorization: Bearer <COMETAPI_KEY> 使用。 |
status | integer | 運作狀態。只有 1 表示該金鑰可用於模型請求。 |
name | string | 供使用者辨識的金鑰顯示名稱。 |
created_time | integer | 金鑰建立時間的 Unix 時間戳(秒)。 |
accessed_time | integer | 金鑰上次使用時間的 Unix 時間戳(秒)。 |
expired_time | integer | 金鑰到期時間的 Unix 時間戳(秒)。-1 表示永不過期。 |
remain_quota | integer | CometAPI 內部配額單位中的剩餘配額。 |
used_quota | integer | 此金鑰已消耗的 CometAPI 內部配額單位。 |
unlimited_quota | boolean | 此金鑰是否略過剩餘配額檢查。 |
model_limits_enabled | boolean | 此金鑰是否啟用模型限制。 |
model_limits | string | 當 model_limits_enabled 為 true 時,此金鑰允許使用的 model ID,使用逗號分隔。空字串表示未設定模型清單。 |
allow_ips | string or null | IP 允許清單,以單一字串表示並用換行分隔。每個項目可以是單一 IPv4 位址、單一 IPv6 位址、IPv4 CIDR 或 IPv6 CIDR。null 或 "" 表示沒有 IP 限制。 |
group | string | 帳戶群組限制。空字串表示沒有明確的群組限制。 |
cross_group_retry | boolean | 是否啟用跨群組重試,以支援自動群組路由。 |
授權
Personal access token copied from CometAPI Console > Personal Settings. Send the raw token value; do not prefix it with Bearer.
查詢參數
Page number to return. Defaults to 1.
必填範圍:
x >= 1Number of keys per page. Values above 100 are capped at 100 by the backend.
必填範圍:
1 <= x <= 100