获取 API 密钥列表
curl --request GET \
--url https://zero.cat/api/token/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://zero.cat/api/token/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zero.cat/api/token/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "",
"data": {
"page": 1,
"page_size": 20,
"total": 1,
"items": [
{
"id": 1,
"name": "my-key",
"key": "abcd**********wxyz",
"status": 1,
"created_time": 1767225600,
"accessed_time": 1767225600,
"expired_time": -1,
"remain_quota": 500000,
"used_quota": 0,
"unlimited_quota": false,
"model_limits_enabled": false,
"model_limits": "",
"allow_ips": "",
"group": "",
"cross_group_retry": false,
"auto_groups": [
"<string>"
],
"allow_user_quota_query": true
}
]
}
}API 密钥管理
获取 API 密钥列表
需要个人访问令牌,作用域:api_key:read(API 密钥 → 查看)。
返回的 key 是打码后的密钥。需要完整密钥时调用 获取完整 API 密钥。
GET
/
api
/
token
/
获取 API 密钥列表
curl --request GET \
--url https://zero.cat/api/token/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://zero.cat/api/token/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://zero.cat/api/token/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "",
"data": {
"page": 1,
"page_size": 20,
"total": 1,
"items": [
{
"id": 1,
"name": "my-key",
"key": "abcd**********wxyz",
"status": 1,
"created_time": 1767225600,
"accessed_time": 1767225600,
"expired_time": -1,
"remain_quota": 500000,
"used_quota": 0,
"unlimited_quota": false,
"model_limits_enabled": false,
"model_limits": "",
"allow_ips": "",
"group": "",
"cross_group_retry": false,
"auto_groups": [
"<string>"
],
"allow_user_quota_query": true
}
]
}
}
