查詢單一 API Key
GET /api/open/v1/keys/:id| 參數 | 位置 | 類型 | 必填 | 說明 |
|---|---|---|---|---|
id | path | integer | 是 | Key ID,正整數 |
curl https://www.routeapi.ai/api/open/v1/keys/12 \ -H "Authorization: Bearer $ROUTEAPI_MANAGEMENT_KEY"{ "success": true, "message": "", "data": { "id": 12, "name": "bot", "key": "sk-abcd**********wxyz", "status": 1, "created_time": 1729000000, "accessed_time": 1729000000, "expired_time": -1, "remain_amount": 10.00, "unlimited": false, "used_amount": 0.00, "model_limits_enabled": false, "model_limits": "", "allow_ips": "" }}欄位說明見 Key 物件。
| HTTP | code | 情境 |
|---|---|---|
| 400 | invalid_request | id 不是正整數 |
| 404 | not_found | Key 不存在或不屬於你 |
其他通用錯誤碼見 開放平台 API 錯誤。
- 回傳的
key是遮罩值。需要完整明文 Key 請呼叫 取得完整 API Key;完整 Key 也會在 建立 時回傳一次。