---
title: Anthropic
url: https://arcana.otnelhq.com/docs/providers/anthropic
---

# Anthropic Claude



Anthropic provides Claude models with exceptional coding, reasoning, and long-context capabilities. Arcana supports prompt caching for faster, cheaper repeated contexts.




## Setup



```bash
# 1. Get your API key from https://console.anthropic.com/
export ANTHROPIC_API_KEY=sk-ant-...

# 2. Verify detection
arcana doctor

# 3. Run
arcana run "hello"
```




## Available Models



| Model | Context | Best For |
| --- | --- | --- |
| `claude-sonnet-4` | 200K | Best balance of speed, quality, and cost |
| `claude-opus-4` | 200K | Highest quality, complex reasoning |
| `claude-haiku-3.5` | 200K | Fast, cheap, good for extraction |




## Config File



```json
{
  "provider": "anthropic",
  "model": "claude-sonnet-4",
  "utilityModel": "claude-haiku-3.5"
}
```




## Prompt Caching



Anthropic supports prompt caching which reduces costs for repeated context (system prompts, long documents). Arcana uses this automatically when available.



- Cached input tokens cost 10% of normal price
- Cache writes cost 25% more than normal input
- Cache TTL is 5 minutes (extended on each use)




## Environment Variables



| Variable | Description |
| --- | --- |
| `ANTHROPIC_API_KEY` | Your Anthropic API key (required) |
| `ANTHROPIC_BASE_URL` | Custom base URL for proxies |




## Pricing Notes



| Model | Input | Output |
| --- | --- | --- |
| claude-sonnet-4 | $3.00 | $15.00 |
| claude-opus-4 | $15.00 | $75.00 |
| claude-haiku-3.5 | $0.80 | $4.00 |



Prices per 1M tokens. Check [anthropic.com/pricing](https://anthropic.com/pricing) for current rates.




## Tips



- `claude-sonnet-4` is the recommended default — excellent quality at reasonable cost
- Use `claude-haiku-3.5` as the `utilityModel` for extraction tasks
- Claude excels at long-context tasks — 200K tokens is roughly 150K words
- Prompt caching is automatic — no configuration needed
