Get an API Key
GET /api/open/v1/keys/:idRequest parameters
Section titled “Request parameters”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | Key ID, a positive integer |
Request example
Section titled “Request example”curl https://www.routeapi.ai/api/open/v1/keys/12 \ -H "Authorization: Bearer $ROUTEAPI_MANAGEMENT_KEY"Response example
Section titled “Response example”{ "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": "" }}For field descriptions, see Key object.
Errors
Section titled “Errors”| HTTP | code | Scenario |
|---|---|---|
| 400 | invalid_request | id is not a positive integer |
| 404 | not_found | The Key does not exist or does not belong to you |
For other common error codes, see Platform API errors.
- The returned
keyis masked. To get the full plaintext Key, use Reveal an API Key; the full Key is also returned once on creation.