請求頭
| 請求頭 | 必填 | 說明 |
|---|---|---|
Authorization | ✓ | Bearer YOUR_ACCESS_TOKEN,帳號訪問令牌(控制台登入態,非 sk- API Key) |
GET /api/token/
分頁列出當前帳號的所有 API Key。名稱 / 前綴搜尋請用 GET /api/token/search。
查詢參數
| 查詢參數 | 必填 | 類型 | 說明 |
|---|---|---|---|
p | integer | 頁次,從 1 開始 | |
page_size | integer | 每頁數量 |
curl "https://bearlab.ai/api/token/?p=1&page_size=10" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
{
"success": true,
"message": "",
"data": {
"items": [
{
"id": 10623,
"user_id": 42,
"key": "ntEH**********7nAh",
"status": 1,
"name": "my-token",
"created_time": 1781977779,
"accessed_time": 1781977779,
"expired_time": -1,
"remain_quota": 0,
"unlimited_quota": true,
"used_quota": 0,
"model_limits_enabled": false,
"model_limits": "",
"allow_ips": "",
"group": "",
"cross_group_retry": false
}
],
"page": 1,
"page_size": 10,
"total": 7
}
}
| 欄位 | 類型 | 說明 |
|---|---|---|
key | string | 已脫敏(首 4 + ********** + 末 4 位);完整 Key 僅建立時一次性可見 |
status | integer | 1 啟用 / 2 停用 / 3 過期 / 4 耗盡 |
expired_time | integer | 過期時間(Unix 秒),-1 永不過期 |
remain_quota | integer | 剩餘額度(quota,500000 = 1 美元) |
unlimited_quota | boolean | 是否無限額度 |
used_quota | integer | 已用額度 |
model_limits_enabled | boolean | 是否啟用模型白名單 |
model_limits | string | 模型白名單(逗號分隔,空串不限制) |
allow_ips | string | null | IP 白名單(空串 / null 不限制) |
group | string | 令牌分組 |
cross_group_retry | boolean | 是否跨分組重試(僅 auto 分組有效) |
data.page / page_size / total | integer | 分頁資訊 |