查询单个 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 也会在 创建 时返回一次。