Arcana ARCANA

Anthropic Claude

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

Setup

# 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

ModelContextBest For
claude-sonnet-4200KBest balance of speed, quality, and cost
claude-opus-4200KHighest quality, complex reasoning
claude-haiku-3.5200KFast, cheap, good for extraction

Config File

{
  "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

VariableDescription
ANTHROPIC_API_KEYYour Anthropic API key (required)
ANTHROPIC_BASE_URLCustom base URL for proxies

Pricing Notes

ModelInputOutput
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 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
Last updated: Jul 24, 2026