List AI providers in a group
GET /aisix/admin/providers
GET /aisix/admin/providersInteractive request editor loads with JavaScript.
In: header
Query Parameters
AI Gateway group ID (filter resources by group).
1 <= lengthOrder to list the resources by. The sorting index follows the configuration of order_by.
"desc"Value in
- "asc"
- "desc"
Number of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valuePage number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueIndex to order AI providers by.
"updated_at"Value in
- "name"
- "type"
- "created_at"
- "updated_at"
Response Body
application/json
application/json
curl -X GET "$API_BASE_URL/aisix/admin/providers?ai_gateway_group_id=abc1234567890"Successfully retrieved the paginated list of AI providers.
{
"total": 1,
"list": [
{
"id": "provider-abc123",
"ai_gateway_group_id": "group-abc123",
"name": "my-openai-provider",
"type": "openai",
"config": {
"api_key": "sk-..."
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
GET /aisix/admin/providers
List AI providers in a group
IAM Action: ai_gateway:ListAIProviders, Resource: arn:api7:ai_gateway:aigatewaygroup/%s
Returns all AI provider configurations in the specified AI Gateway group.
Parameters
ai_gateway_group_id(query, string, required): AI Gateway group ID (filter resources by group).direction(query, string, optional): Order to list the resources by. The sorting index follows the configuration oforder_by.page_size(query, integer, optional): Number of resources listed per page. Used together withpage. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.page(query, integer, optional): Page number of the listed resources. Used together withpage_size. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.order_by(query, string, optional): Index to order AI providers by.
Responses
-
200: Successfully retrieved the paginated list of AI providers. -
allOf variant 1
-
list(array, optional): An array of resources. -
total(integer, optional): Total number of objects. -
allOf variant 2
-
list(array, optional): An array of AI providers. -
list[].id(string, optional): Unique provider ID. -
list[].ai_gateway_group_id(string, optional): ID of the AI Gateway group this provider belongs to (control-plane only). -
list[].name(string, optional): Human-readable name for the provider. -
list[].type(string, optional): Provider type. Determines the shape of the config object. -
list[].config(object, optional): Provider-specific credentials and configuration. The required fields depend on the provider type. See the request schemas for details. -
list[].created_at(string, optional): Timestamp when the provider was created. -
list[].updated_at(string, optional): Timestamp when the provider was last updated. -
400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details. -
value(object, optional): The specific resource. -
error_msg(string, optional): The error message.
cURL
curl -X GET '$API_BASE_URL/aisix/admin/providers'