获取令牌列表
API Key & 控制台管理
获取令牌列表
分页获取当前用户的 API 令牌列表
GET
获取令牌列表
Documentation Index
Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
Use this file to discover all available pages before exploring further.
接口说明
获取当前用户创建的所有 API 令牌(Token),支持分页。这组
/api/token/* 接口主要用于 Crazyrouter 控制台中的 API Key 管理自动化。它们需要用户 access token 与 New-Api-User 请求头,不是给普通 sk-xxx 模型调用流程直接使用的接口。认证方式
使用用户的 Access Token 进行认证,需要在请求头中携带:请求参数
页码。代码兼容旧写法,但建议从
1 开始每页数量,最大 100
响应格式
字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
id | int | 令牌 ID |
key | string | API Key(sk-xxx 格式) |
status | int | 状态:1=启用,2=禁用 |
name | string | 令牌名称 |
expired_time | int | 过期时间戳,-1 表示永不过期 |
remain_quota | int | 剩余额度 |
unlimited_quota | bool | 是否无限额度 |
used_quota | int | 已使用额度 |
model_limits_enabled | bool | 是否启用模型白名单 |
model_limits | string | 模型限制配置字符串 |
allow_ips | string | IP 白名单字符串 |
group | string | 分组 |