> ## 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 Management Chat and Route Test API

> Send a test chat completion through the Aria Compute ROUTER and preview the routing decision. Supports dry-run mode.

The management Chat endpoint lets you test how a chat request would be routed through the Aria Compute ROUTER. It accepts the same request body as `/v1/chat/completions` and adds an optional `dry_run` flag. Use it to validate routing rules, inspect provider selection, and debug recipes without emitting downstream requests.

This endpoint returns both the routing decision and, when not in dry-run mode, the downstream provider response.

## Endpoint

```http theme={null}
POST /v1/router/chat
```

## Authentication

Authenticate with a session cookie or pass `Authorization: Bearer <api-key>`.

## Request Body

<ParamField body="model" type="string" required>
  Target model or virtual model name.
</ParamField>

<ParamField body="messages" type="array" required>
  Conversation messages in standard chat-completion shape.
</ParamField>

<ParamField body="dry_run" type="boolean">
  When true, the router computes the route decision without sending the request to the provider.
</ParamField>

<ParamField body="temperature" type="number">
  Sampling temperature.
</ParamField>

<ParamField body="max_tokens" type="integer">
  Maximum tokens to generate.
</ParamField>

## Response

<ResponseField name="decision" type="object">
  Routing decision produced by the router.

  <Expandable title="properties">
    <ResponseField name="provider" type="string">
      Selected provider name.
    </ResponseField>

    <ResponseField name="model" type="string">
      Resolved model name sent to the provider.
    </ResponseField>

    <ResponseField name="recipe" type="string">
      Recipe that matched this request.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="response" type="object">
  Downstream provider response. Omitted when `dry_run` is true.

  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Completion identifier.
    </ResponseField>

    <ResponseField name="choices" type="array">
      Generated choices.
    </ResponseField>

    <ResponseField name="usage" type="object">
      Token usage summary.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://router.example.com/v1/router/chat" \
    -H "Authorization: Bearer <api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "default",
      "messages": [{"role": "user", "content": "Hello router"}],
      "dry_run": true
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "decision": {
      "provider": "openai",
      "model": "gpt-4o",
      "recipe": "semantic-router"
    },
    "response": {
      "id": "chatcmpl-example",
      "choices": [
        {
          "index": 0,
          "message": {"role": "assistant", "content": "Hello! How can I help?"},
          "finish_reason": "stop"
        }
      ],
      "usage": {
        "prompt_tokens": 10,
        "completion_tokens": 8,
        "total_tokens": 18
      }
    }
  }
  ```
</ResponseExample>


## Related topics

- [Authenticate with Aria Compute ROUTER](/api-reference/router/authentication.md)
- [Aria Compute ROUTER: OpenAI-compatible inference gateway](/api-reference/router/introduction.md)
- [POST /v1/chat/completions: OpenAI-compatible chat inference](/api-reference/router/openai/chat-completions.md)
- [Router Management Plane Models List API](/api-reference/router/management/models.md)
- [aria-router runtime and FFI](/sdks/router-runtime.md)
