> ## 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.

# Claude Sonnet 4.6

> claude-sonnet-4.6 — Anthropic's best for code and complex tasks. ~$0.0336 typical/request (billed per token).

|                   |                                                         |
| ----------------- | ------------------------------------------------------- |
| **Model ID**      | `claude-sonnet-4.6`                                     |
| **Provider**      | Anthropic                                               |
| **Typical price** | \~\$0.0336                                              |
| **Tier**          | Premium                                                 |
| **Best for**      | Code generation, complex instructions, nuanced analysis |

## Example

```bash theme={null}
curl -X POST https://www.ninjachat.ai/api/v1/chat \
  -H "Authorization: Bearer nj_sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-4.6", "messages": [{"role": "user", "content": "Hello!"}]}'
```

```python theme={null}
import requests, os

r = requests.post("https://www.ninjachat.ai/api/v1/chat",
    headers={"Authorization": f"Bearer {os.environ['NINJACHAT_API_KEY']}"},
    json={"model": "claude-sonnet-4.6", "messages": [{"role": "user", "content": "Hello!"}]}
)
print(r.json()["choices"][0]["message"]["content"])
```

***

**Guides:** [Chat Completions](/chat) | [All Models](/models) | [Pricing](/pricing) | [Error Handling](/error-handling)
