API7 Docs

List AI providers in a group

GET /aisix/admin/providers

GET /aisix/admin/providers

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Query Parameters

ai_gateway_group_id*string

AI Gateway group ID (filter resources by group).

Length1 <= length
direction?string

Order to list the resources by. The sorting index follows the configuration of order_by.

Default"desc"

Value in

  • "asc"
  • "desc"
page_size?integer

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.

Formatint32
Range1 <= value
page?integer

Page 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.

Formatint32
Range1 <= value
order_by?string

Index to order AI providers by.

Default"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"
    }
  ]
}
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 of order_by.
  • page_size (query, integer, optional): 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.
  • page (query, integer, optional): Page 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.
  • 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'