List API Keys
GET /api/open/v1/keysRequest parameters
Section titled “Request parameters”| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
p | query | integer | No | 1 | Page number, from 1 to 1000000 |
page_size | query | integer | No | 10 | Items per page, from 1 to 1000 |
name | query | string | No | — | Filter by exact Key name; repeat the parameter for multiple values (?name=a&name=b). Commas are not supported because names may contain commas |
Each multi-value parameter accepts at most 50 values; more returns 400 invalid_request. When name is set, total reflects the filtered result. Explicitly supplied invalid p / page_size return 400; see Pagination.
Request example
Section titled “Request example”curl "https://www.routeapi.ai/api/open/v1/keys?p=1&page_size=20&name=bot" \ -H "Authorization: Bearer $ROUTEAPI_MANAGEMENT_KEY"Response example
Section titled “Response example”{ "success": true, "message": "", "data": { "items": [ { "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": true, "model_limits": "gpt-4o,gpt-4o-mini", "allow_ips": "" } ], "total": 1, "page": 1, "page_size": 20 }}Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
items | array | Key objects, sorted by ID descending (newest first) |
total | integer | Total number of Keys matching the filters |
page | integer | Current page number |
page_size | integer | Effective items per page |
Key object
Section titled “Key object”All Platform API endpoints that return a Key use the same structure:
| Field | Type | Description |
|---|---|---|
id | integer | Key ID, used as :id in other endpoints |
name | string | Name |
key | string | Key value with the sk- prefix; masked everywhere except the create endpoint and Reveal an API Key |
status | integer | 1 enabled, 2 disabled (set manually; can be re-enabled), 3 expired, 4 exhausted; use the update endpoint to enable/disable (1 / 2 only) |
created_time | integer | Creation time, unix seconds |
accessed_time | integer | Last used time, unix seconds |
expired_time | integer | Expiration time, unix seconds; -1 means never expires |
remain_amount | number | Remaining available amount, two decimals; meaningless when unlimited is true |
unlimited | boolean | Whether the Key is unlimited |
used_amount | number | Used amount, two decimals |
model_limits_enabled | boolean | Whether the model allowlist is enabled |
model_limits | string | Allowed models, comma-separated |
allow_ips | string | Allowed IPs, newline-separated; empty string means no restriction |
- Amounts use the site display currency; see Get balance.
- For common error codes, see Platform API errors.