外观
获取令牌列表
GET
需在服务端调用,不支持在线调试https://vip.zen-ai.top/api/token/?p=1&size=20分页获取当前用户的令牌,按创建时间倒序排列。需要 系统访问令牌。
请求示例
bash
curl "https://vip.zen-ai.top/api/token/?p=1&size=20" \
-H "Authorization: Bearer $VIP_ACCESS_TOKEN" \
-H "New-Api-User: $VIP_USER_ID"python
import requests
headers = {"Authorization": "Bearer 你的系统访问令牌", "New-Api-User": "123"}
resp = requests.get("https://vip.zen-ai.top/api/token/", headers=headers, params={"p": 1, "size": 20}).json()
for t in resp["data"]["items"]:
print(t["id"], t["name"], t["group"], "sk-" + t["key"])响应示例
json
{
"success": true,
"message": "",
"data": {
"page": 1,
"page_size": 20,
"total": 2,
"items": [
{
"id": 42,
"user_id": 123,
"key": "Xk2f...Q9aZ",
"status": 1,
"name": "claude-code",
"created_time": 1790600000,
"accessed_time": 1790684800,
"expired_time": -1,
"remain_quota": 5000000,
"unlimited_quota": false,
"model_limits_enabled": false,
"model_limits": "",
"allow_ips": "",
"used_quota": 1200000,
"group": "AzClaude"
}
]
}
}