列出 API Keys
GET
/v1/keys列出当前认证用户拥有的 API Keys。
默认只返回 active 且未过期的推理 API Keys。设置 include_disabled=true 可包含 disabled 或已过期的 keys。
身份验证
Authorization Bearer <USER_JWT>
必须使用已登录用户 JWT。普通推理 API Key、MANAGEMENT Key 和 PROVISIONING Key 均不支持此接口。企业机器自动化请使用 Enterprise 控制面接口。
查询参数
include_disabledstringtrue、1 或 yes 时包含 disabled 与已过期 keys。
offsetinteger跳过的 Key 数量。负数按 0 处理。
workspace_idstring按 workspace code 过滤。
响应
dataobject[]API Key 信息列表。
data.hashstring管理接口使用的 hash 标识。
data.namestringAPI Key 名称。
data.labelstring展示标签,与 name 一致。
data.disabledboolean当 Key 状态不是 ACTIVE 或 expires_at 已过期时为 true。
data.workspace_idstringKey 所属 workspace code。
data.creator_user_idstring | null所有者用户 ID。
data.created_atstring创建时间,UTC ISO-8601 格式。
data.updated_atstring | null最后更新时间。
data.expires_atstring | nullUTC 过期时间,或 null。
data.usagenumber该 Key 累计消费金额(USD),不是赠送 Credit 余额。
data.usage_dailynumber当前 UTC 日内该 Key 的消费金额(USD)。
data.usage_weeklynumber当前 UTC 周内该 Key 的消费金额(USD),周一开始。
data.usage_monthlynumber当前 UTC 自然月内该 Key 的消费金额(USD)。
data.limitnumber | null配置的 Key 消费上限(USD);未设置时为 null。
data.limit_remainingnumber | null适用限额周期内的剩余预算(USD);未设置上限时为 null。
data.limit_resetstring | nulldaily | weekly | monthly | null(终身)。
data.is_free_tierboolean当前为 false。
data.is_management_keyboolean此响应描述推理 Key,该字段为 false。
data.is_provisioning_keyboolean当前为 false。
data.rate_limitobject每分钟请求限制信息。
此页面对您有帮助吗?