> ## 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 Anthropic Messages requests through a router.

```bash 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"}]
  }'
```

Use `/v1` for your default router. For a specific router, send the same body to `https://routing.dari.dev/{router_id}/messages`.

The response follows the Anthropic Messages format and adds `dari_routing`, which identifies the selected model and reasoning effort.

## Streaming And Tools

Set `stream: true` for Server-Sent Events. Tools use Anthropic's standard `tools`, `tool_choice`, `tool_use`, and `tool_result` shapes.

See the [Anthropic Messages API Reference](/api-reference/router/messages) for supported fields.
