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

# Anthropic compatibility

> Send Messages API requests through NinjaChat.

Use your NinjaChat [API key](/authentication) with `/api/v1/messages`. The endpoint accepts `x-api-key` and Anthropic-style messages.

## Send a message

```bash cURL theme={null}
curl https://www.ninjachat.ai/api/v1/messages \
  -H "x-api-key: $NINJACHAT_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-5","max_tokens":256,"messages":[{"role":"user","content":"Explain edge caching in one paragraph."}]}'
```

Read the answer from the response's `content` blocks. Set `stream: true` for Messages-style streaming events. The NinjaChat SDK exposes this as `client.messages.create`.

Choose a model and supported parameters from the [catalog](/models-overview). NinjaChat's supported options and billing apply; this is not a proxy for every Anthropic endpoint.
