列出 API Keys

GET/v1/keys

列出当前认证用户拥有的 API Keys。

默认只返回 active 且未过期的推理 API Keys。设置 include_disabled=true 可包含 disabled 或已过期的 keys。

身份验证

Authorization Bearer

使用 Token360 API Key(sk-token360-...)或已登录用户 JWT。

查询参数

include_disabledstring

true、1 或 yes 时包含 disabled 与已过期 keys。

offsetinteger

跳过的 Key 数量。负数按 0 处理。

workspace_idstring

按 workspace code 过滤。

响应

dataobject[]

API Key 信息列表。

data.hashstring

管理接口使用的 hash 标识。

data.namestring

API Key 名称。

data.labelstring

展示标签,与 name 一致。

data.disabledboolean

当 Key 状态不是 ACTIVE 或 expires_at 已过期时为 true。

data.workspace_idstring

Key 所属 workspace code。

data.creator_user_idstring | null

所有者用户 ID。

data.created_atstring

创建时间,UTC ISO-8601 格式。

data.updated_atstring | null

最后更新时间。

data.expires_atstring | null

UTC 过期时间,或 null。

data.usagenumber

Token360 credit 累计使用量(USD)。

data.usage_dailynumber

日使用量,当前为 0。

data.usage_weeklynumber

周使用量,当前为 0。

data.usage_monthlynumber

月使用量,当前为 0。

data.limitnumber | null

额度限制,当前为 null。

data.limit_remainingnumber | null

剩余额度,当前为 null。

data.limit_resetstring | null

额度重置周期,当前为 null。

data.is_free_tierboolean

当前为 false。

data.is_management_keyboolean

当前管理响应中为 true。

data.is_provisioning_keyboolean

当前为 false。

data.rate_limitobject

每分钟请求限制信息。

请求

Shell
1curl "https://api.token360.ai/v1/keys?include_disabled=true" \
2  -H "Authorization: Bearer sk-token360-inf-..."

响应

JSON
1{
2  "data": [
3    {
4      "hash": "f01d52606dc8f0a8303a7b5cc3fa07109c2e346cec7c0a16b40de462992ce943",
5      "name": "Analytics Service Key",
6      "label": "Analytics Service Key",
7      "disabled": false,
8      "workspace_id": "DEFAULT",
9      "creator_user_id": "42",
10      "created_at": "2026-06-04T00:00:00Z",
11      "updated_at": "2026-06-04T01:00:00Z",
12      "expires_at": null,
13      "usage": 12.34,
14      "usage_daily": 0,
15      "usage_weekly": 0,
16      "usage_monthly": 0,
17      "limit": null,
18      "limit_remaining": null,
19      "limit_reset": null,
20      "is_free_tier": false,
21      "is_management_key": true,
22      "is_provisioning_key": false,
23      "rate_limit": {
24        "interval": "minute",
25        "note": "Token-360 per-minute request limit",
26        "requests": 1000
27      }
28    }
29  ]
30}
此页面对您有帮助吗?