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

# Anthropic Messages API

> Send a routed Anthropic Messages request

<ParamField header="Authorization" type="string" required>
  `Bearer` plus a Routing API key.
</ParamField>

<ParamField body="model" type="string" required>
  Must be `dari/routing`.
</ParamField>

<ParamField body="max_tokens" type="number" required>
  Maximum output tokens.
</ParamField>

<ParamField body="messages" type="array" required>
  Anthropic Messages input objects.
</ParamField>

<ParamField body="system" type="string | array">
  System instructions.
</ParamField>

<ParamField body="stream" type="boolean">
  Stream with Server-Sent Events.
</ParamField>

<ParamField body="tools" type="array">
  Anthropic tool definitions.
</ParamField>

<ParamField body="thinking" type="object">
  Enable Anthropic extended thinking when the selected model supports it.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://routing.dari.dev/v1/messages \
    -H "Authorization: Bearer $DARI_ROUTING_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "dari/routing",
      "max_tokens": 256,
      "messages": [{"role": "user", "content": "Hello from Dari"}]
    }'
  ```
</RequestExample>

The response follows the Anthropic Messages shape. The selected model and reasoning effort are included in the `dari_routing` metadata returned with the message. The `/v1` endpoint uses your organization's default router; use `https://routing.dari.dev/{router_id}/messages` for a specific router.
