跳轉到主要內容
GET
cURL
使用此端點依 ID 擷取一筆 API 金鑰記錄。
請在取得具備 api_key:read 權限的個人存取 Token,位置為 Console → 個人設定。請將該 Token 作為原始 Authorization 標頭值傳送。請勿加上 Bearer 前綴。
為了安全起見,key 欄位包含無法驗證模型請求的遮罩 API 金鑰。 請在您建立 API 金鑰時,從 data.key 儲存完整的 API 金鑰。 建立 API 金鑰. 若您未儲存,請開啟 Console → API 金鑰. 找出您建立的 API 金鑰,然後選取 複製,並完成身分驗證。 id 路徑參數是由以下項目傳回的數值 API 金鑰 ID: 建立 API 金鑰 或 列出 API 金鑰.

API 金鑰狀態

傳回欄位

授權

Authorization
string
header
必填

Personal access token with the api_key:read permission, generated in CometAPI Console > Personal Settings. Send the raw token value; do not prefix it with Bearer.

路徑參數

id
integer
必填

Numeric API key ID returned by the list endpoint.

回應

200 - application/json

API key record.

success
boolean
必填

Whether the operation succeeded.

message
string
必填

Status message. Empty on success.

data
object
必填

API key record with a masked key value.

最後修改於 2026年10月26日