Skip to Content
goldflow.cc 文档
管理接口令牌管理

更新令牌

PUT
/api/token/

更新已有 API 令牌。

Authorization

headerAuthorizationBearer <API key>

使用 Authorization Bearer API Key 进行鉴权。

Request Body

application/json
  1. body
id?integer

令牌 ID,更新令牌时必填。

name*string

API 令牌名称。

remain_quota?integer

令牌剩余额度,支持时可用 -1 表示不限额。

expired_time?integer

过期时间,Unix 秒级时间戳;支持时可用 -1 表示不过期。

unlimited_quota?boolean

是否启用不限额。

model_limits_enabled?boolean

是否启用模型调用限制。

model_limits?string

允许调用的模型范围。

allow_ips?string

允许访问的 IP 白名单。

Response Body

更新令牌响应。

application/json
  1. response
success?boolean

请求是否成功。

message?string

接口返回消息。

data?

API 令牌详情。

Example Request
curl -X PUT 'https://goldflow.cc/api/token/' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response200
{  "success": true,  "message": "string",  "data": {    "id": 0,    "name": "string",    "key": "string",    "status": 0,    "remain_quota": 0,    "used_quota": 0,    "expired_time": 0,    "created_time": 0  }}