List Provider Keys
GET /provider_keys
GET /provider_keysInteractive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Query Parameters
Case-insensitive substring search over the provider key display name.
Narrow to one provider-key kind: catalog for keys bound
to a models.dev catalog provider, byo for operator-owned
endpoints (provider == "byo"). Omit for both.
Value in
- "catalog"
- "byo"
1-based page number. Requires page_size on the same
request.
1 <= value <= 10000000Page size. Values above 200 are clamped to 200. Omit to return the full list.
1 <= valueResponse Body
application/json
application/json
application/json
curl -X GET "$AISIX_CP/provider_keys" \ -H "Authorization: Bearer $AISIX_TOKEN"OK
{
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
"provider": "string",
"display_name": "string",
"allowed_environments": [
"2f8fd63c-350f-4e43-9e38-47af879eaada"
],
"byo_adapter": "openai",
"strip_headers": [
"string"
],
"telemetry_label": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"total": 0,
"page": 0,
"page_size": 0
}Request body or parameters failed validation.
{
"error": {
"code": "string",
"message": "string"
}
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Complete operation details and schema variants
GET /provider_keys
List Provider Keys
List provider keys in the authenticated organization. Fetch a
single key to see its endpoint override. Pagination is opt-in:
omit page_size to get the full key list in one response.
page is only meaningful together with page_size and is
rejected without it.
Parameters
-
q(query, string, optional): Case-insensitive substring search over the provider key display name. -
kind(query, string, optional): Narrow to one provider-key kind:catalogfor keys bound to a models.dev catalog provider,byofor operator-owned endpoints (provider == "byo"). Omit for both. -
page(query, integer, optional): 1-based page number. Requirespage_sizeon the same request. -
page_size(query, integer, optional): Page size. Values above 200 are clamped to 200. Omit to return the full list.
Responses
-
200: OK -
data(array, required): Provider keys visible to the authenticated organization. -
data[].id(string, required): Provider key ID. -
data[].org_id(string, required): Organization ID that owns this provider key. -
data[].provider(string, required): Upstream provider identifier. -
data[].display_name(string, required): Human-readable provider key name. -
data[].allowed_environments(array, required): Environments that can use this provider key when creating model resources. An empty array makes the key unavailable to all environments. -
data[].byo_adapter(string, optional): Protocol adapter used by BYO provider keys. -
data[].strip_headers(array, required): Request headers stripped before forwarding traffic upstream. Null values use the default credential-header strip set. An empty array strips nothing. -
data[].telemetry_label(string, required): Stable provider-key label used in usage and log records. -
data[].created_at(string, required): Time when the provider key was created. -
data[].updated_at(string, required): Time when the provider key was last updated. -
total(integer, optional): Total number of matching provider keys across all pages. -
page(integer, optional): Current 1-based page. -
page_size(integer, optional): Effective page size after clamping. -
400: Request body or parameters failed validation. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators. -
401: Missing or invalid bearer. Response fields (application/json): identical toGET /provider_keys, response 400 above.
cURL
curl -X GET '$AISIX_CP/provider_keys' -H 'Authorization: Bearer $AISIX_TOKEN'