> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Router Providers List and Upsert API

> List all configured providers or upsert a provider spec in the Aria Compute ROUTER. Admin access required for PUT updates.

Use the Providers endpoint to list all configured inference providers or to create and update an individual provider spec. A GET returns the full provider collection. A PUT upserts a provider by its identifier. Only admin callers may modify providers.

This is useful when you need to rotate backend references, add new models, or onboard a new provider without replacing the entire router configuration.

## Endpoint

```http theme={null}
GET /v1/router/providers
```

```http theme={null}
PUT /v1/router/providers
```

## Authentication

Authenticate with a session cookie or pass `Authorization: Bearer <api-key>`. The PUT method requires an admin role.

## GET Response

<ResponseField name="items" type="array">
  List of configured providers.

  <Expandable title="items">
    <ResponseField name="name" type="string">
      Unique provider identifier.
    </ResponseField>

    <ResponseField name="default_model" type="string">
      Fallback model when none is specified.
    </ResponseField>

    <ResponseField name="models" type="array">
      Model definitions for this provider.

      <Expandable title="items">
        <ResponseField name="name" type="string">
          Model name.
        </ResponseField>

        <ResponseField name="backend_ref" type="string">
          Backend endpoint or identifier.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## PUT Request Body

<ParamField body="name" type="string" required>
  Unique provider identifier.
</ParamField>

<ParamField body="default_model" type="string">
  Fallback model when the client omits a model selection.
</ParamField>

<ParamField body="models" type="array">
  List of model definitions with backend references.
</ParamField>

## PUT Response

<ResponseField name="name" type="string">
  Identifier of the upserted provider.
</ResponseField>

<ResponseField name="updated" type="boolean">
  Whether the provider was updated (true) or created (false).
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  # List providers
  curl -X GET "https://router.example.com/v1/router/providers" \
    -H "Authorization: Bearer <api-key>"

  # Upsert a provider (admin only)
  curl -X PUT "https://router.example.com/v1/router/providers" \
    -H "Authorization: Bearer <api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "openai",
      "default_model": "gpt-4o",
      "models": [
        {"name": "gpt-4o", "backend_ref": "openai/gpt-4o"},
        {"name": "gpt-4o-mini", "backend_ref": "openai/gpt-4o-mini"}
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "items": [
      {
        "name": "openai",
        "default_model": "gpt-4o",
        "models": [
          {"name": "gpt-4o", "backend_ref": "openai/gpt-4o"},
          {"name": "gpt-4o-mini", "backend_ref": "openai/gpt-4o-mini"}
        ]
      },
      {
        "name": "anthropic",
        "default_model": "claude-3-5-sonnet-20241022",
        "models": [
          {"name": "claude-3-5-sonnet-20241022", "backend_ref": "anthropic/claude-3-5-sonnet"}
        ]
      }
    ]
  }
  ```
</ResponseExample>


## Related topics

- [GET /v1/models: List router entrypoints and provider models](/api-reference/router/openai/list-models.md)
- [Router Management Plane Models List API](/api-reference/router/management/models.md)
- [List Replayable Router Requests API](/api-reference/router/replay/list.md)
- [List ROUTER API Keys API](/api-reference/router/keys/list.md)
- [Aria Compute ROUTER: OpenAI-compatible inference gateway](/api-reference/router/introduction.md)
