Installation
Basic Setup
Via OpenRouter (Recommended)
Native API
Available Models
| Model | Context | Reasoning | Best For |
|---|---|---|---|
claude-opus-4.5 | 200k | Yes | Complex extraction |
claude-sonnet-4.5 | 200k | Yes | Balanced performance |
claude-haiku-4.5 | 200k | Yes | Fast, cost-effective |
claude-opus-4 | 200k | Yes | Previous generation |
claude-sonnet-4 | 200k | Yes | Previous generation |
OpenRouter Model IDs
When using OpenRouter, prefix models withanthropic/:
Configuration Options
Capabilities
| Feature | Support |
|---|---|
| Images | Yes (PNG, JPEG, WebP, GIF) |
| PDFs | Yes (up to 100 pages) |
| Structured Output | Yes (tool calling / output_format) |
| Reasoning | Yes (extended thinking) |
| Streaming | Yes |
Input Formats
Images
Claude requires base64-encoded images (URLs are downloaded automatically):PDFs
Extended Thinking
Claude models support extended thinking for complex reasoning:max_tokens (OpenRouter) or budget_tokens (native):
| Effort | OpenRouter | Native |
|---|---|---|
| low | 20% of max_tokens | 1024 tokens min |
| medium | 50% of max_tokens | Calculated |
| high | 80% of max_tokens | Up to 32000 tokens |
Prompt Caching
Claude supports prompt caching for repeated extractions with the same schema:cacheCreationInputTokens: Tokens written to cachecacheReadInputTokens: Tokens read from cache
Structured Output
Claude 4.5 models support native structured output viaoutput_format. Older models use tool calling:
- Sonnet 4.5+: Native
output_formatwithjson_schema - Opus 4.1+: Native
output_formatwithjson_schema - Haiku: Tool calling fallback
Production Setup
Pricing
Via OpenRouter (approximate):| Model | Input (per 1k) | Output (per 1k) |
|---|---|---|
| claude-opus-4.5 | $0.015 | $0.075 |
| claude-sonnet-4.5 | $0.003 | $0.015 |
| claude-haiku-4.5 | $0.0008 | $0.004 |