跳转到主要内容
GET
cURL
使用此端点可按 ID 获取一条 API 密钥记录。
在以下位置生成具有 api_key:read 权限的个人访问令牌 控制台 → 个人设置。将该令牌作为原始 Authorization 请求头值发送。请勿添加 Bearer 前缀。
为确保安全,key 字段包含经过掩码处理的 API 密钥,无法用于对模型请求进行身份验证。 请在 data.key 中保存完整的 API 密钥,当您 创建 API 密钥. 如果未保存,请打开 控制台 → 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日