跳转到主要内容
GET
https://aihubmix.com
/
api
/
token
/
{token_id}
获取单个 KEY 详情
curl --request GET \
  --url https://aihubmix.com/api/token/{token_id} \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "message": "<string>",
  "data": {
    "id": 123,
    "user_id": 123,
    "key": "<string>",
    "status": 123,
    "name": "<string>",
    "created_time": 123,
    "accessed_time": 123,
    "expired_time": 123,
    "remain_quota": 123,
    "unlimited_quota": true,
    "used_quota": 123,
    "models": "<string>",
    "subnet": "<string>"
  }
}

请求参数

请求头(headers)

请求身份认证。接口使用 AIHubMix Manage Key 进行身份认证。
请求内容类型。此参数必须设置为 application/json。

路径参数(Path)

token_id
integer
必填
KEY ID。

响应参数

success
boolean
是否成功。
message
string
提示信息(可能为空)。请求失败时返回失败原因。
data
object
Key 详情对象。请求失败时 data 可能为空对象 {}
id
integer
Key ID。
user_id
integer
用户 ID。
key
string
Key 字符串(用于调用/鉴权)。
status
integer
Key 状态。0 为未启用,1 为启用。
name
string
Key 名称。
created_time
integer
Key 创建时间(UNIX 时间戳)。
accessed_time
integer
Key 最近获取/访问时间(UNIX 时间戳)。
expired_time
integer
Key 过期时间(UNIX 时间戳);-1 表示永不过期。
remain_quota
integer
限额余量;-1 表示无限额。
unlimited_quota
boolean
是否无限额。true 表示无限额;false 表示限额。
used_quota
integer
已使用额度。实际用量换算:used_quota / 500000。
models
text
限制当前 Key 使用的模型(空字符串表示不限制或未设置)。
subnet
text
IP 限制(空字符串表示不限制或未设置)。