删除令牌
DELETE
https://api.apizt.com/api/token/{id}删除当前账号下指定 ID 的令牌。
删除后该密钥不能继续调用。只想暂停使用时,可使用修改令牌接口禁用令牌。
请求参数
Path 参数
idpathinteger必需要删除的令牌 ID;替换路径中的 {id}。
Header 参数
Authorizationheaderstring必需Bearer 后填写个人设置中的系统访问令牌,不使用模型 API Key。
new-api-userheaderstring必需当前用户 ID,须与系统访问令牌所属账号一致。
Content-Typeheaderstring必需请求体使用 JSON。
Body 参数 application/json
allow_ipsbodystring必需白名单IP列表: 按\n号分割
expired_timebodyinteger必需到期时间戳 单位秒 没有到期限制设置为-1
groupbodystring必需支持分组 按,号分割
model_limitsbodystring必需可用模型列表: 模型名字按,号分割
model_limits_enabledbodyboolean必需可用模型限制设置
namebodystring必需令牌名字
remain_quotabodyinteger必需50w为1刀
unlimited_quotabodyboolean必需无限额度设置
返回响应
application/json
data string数据载荷(常为 Base64 或结构化对象)
message string提示信息
success boolean是否成功
application/json
error* object
message* string错误说明(末尾常附带 request id)
type* string错误类型;网关本地错误一般为 new_api_error
调用时需携带系统访问令牌和当前账号 ID,填写方式见 Header 参数。
响应为结构示例,实际错误文本以返回的 message 或 error.message 为准。
令牌 ID 放在 URL 路径中。