查询当前 API Key

GET/v1/key

先选择查询范围与凭证

  • 单个 Key 用量/限额:使用该推理 API Key 调用 GET /v1/key,读取 usage、limit_remaining、limit_reset。这是 Key 的消费预算,不是企业钱包或授信余额。
  • 企业钱包与授信:使用仅含 tenant:billing:read 的 MANAGEMENT Key 调用 GET /enterprise/v1/billing/balance。不要用推理 Key 或 PROVISIONING Key。
  • 账户费用汇总/请求对账:现有 GET /v1/billing、GET /v1/billing/requests/{request_id} 使用推理 Key 或登录态 JWT;管理 Key 不能调用这些 /v1 接口。费用明细与余额是不同指标。
  • 旧账户余额接口:GET /v1/billing/balance 保留兼容,返回账户级资金,不代表调用 Key 的剩余预算;新企业余额监控优先使用 Enterprise 接口。

企业 API 指南 · 查询企业余额

查询当前请求所使用的 API Key 信息。

身份验证

Authorization Bearer

在 Authorization 请求头中使用要查询的推理 API Key。管理 Key、PROVISIONING Key 和登录态 JWT 均不支持此接口。

响应

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

所有者用户公开 UUID。

data.created_atstring

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

data.updated_atstring | null

最后更新时间。

data.expires_atstring | null

UTC 过期时间,或 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 | null

daily | weekly | monthly | null(终身)。

data.is_free_tierboolean

当前为 false。

data.is_management_keyboolean

本接口接受推理 Key,此字段为 false。

data.is_provisioning_keyboolean

当前为 false。

data.rate_limitobject

每分钟请求限制信息。

请求

Shell
1curl https://api.token360.ai/v1/key \
2  -H "Authorization: Bearer sk-token360-inf-..."

响应

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