ai-api
Anthropic API
API for Claude — frontier models for chat, tool use, agents, and long-context reasoning
REST API to Anthropic's Claude models. Supports streaming, prompt caching, extended thinking, tool use, vision, PDFs, batch processing, and citations. Distributed through Anthropic directly and via Amazon Bedrock, Google Vertex, and Azure AI.
Pricing
| Tier | Price | Notes |
|---|---|---|
| Opus 4.7 — usage | Custom | Input $5 / output $25 / cache-write $6.25 / cache-read $0.50 per 1M tokens. Batch = 50% off. |
| Sonnet 4.6 — usage | Custom | Input $3 / output $15 / cache-write $3.75 / cache-read $0.30 per 1M tokens. Batch = 50% off. |
| Haiku 4.5 — usage | Custom | Input $1 / output $5 / cache-write $1.25 / cache-read $0.10 per 1M tokens. Batch = 50% off. |
Limits
| Tier | Metric | Value | Notes |
|---|---|---|---|
| — | batch sla hours | 24 hours | Batch API completion SLA |
| — | cache ttl 1h | 1 hours | 1-hour cache TTL (beta) |
| — | cache ttl default | 5 minutes | Default prompt-caching TTL (ephemeral) |
| — | context window | 200000 tokens | Default context window across 4.x models |
| — | context window beta | 1000000 tokens | Opus 4.7 1M-token beta window (header gated) |
| — | max request batch mb | 256 MB | Max Batch API request size |
| — | max request files mb | 500 MB | Max Files API upload size |
| — | max request messages mb | 32 MB | Max Messages / Token Counting request size |
| haiku-4-5 | discount batch | 50 % off | Batch API discount vs real-time |
| opus-4-7 | discount batch | 50 % off | Batch API discount vs real-time |
| sonnet-4-6 | discount batch | 50 % off | Batch API discount vs real-time |
Features
Developer interfaces
| Slug | Name | Kind | Version |
|---|---|---|---|
| aws-bedrock | AWS Bedrock | rest | — |
| claude-code | Claude Code CLI | cli | — |
| console | Claude Console (Workbench) | ui | — |
| gcp-vertex | Google Vertex AI | rest | — |
| sdk-go | Go SDK | sdk | 0.x |
| sdk-java | Java SDK | sdk | 0.x |
| azure-ai | Microsoft Azure AI | rest | — |
| sdk-python | Python SDK | sdk | 0.x |
| rest | REST API (Messages + Agents) | rest | v1 |
| sdk-ruby | Ruby SDK | sdk | 0.x |
| sdk-typescript | TypeScript SDK (@anthropic-ai/sdk) | sdk | 0.x |
Compare Anthropic API with
ai-api
Anthropic API vs AssemblyAI
Side-by-side breakdown.
ai-api
Anthropic API vs Deepgram
Side-by-side breakdown.
ai-api
Anthropic API vs ElevenLabs
Side-by-side breakdown.
ai-api
Anthropic API vs Google Gemini API
Side-by-side breakdown.
ai-api
Anthropic API vs Groq
Side-by-side breakdown.
ai-api
Anthropic API vs OpenAI API
Side-by-side breakdown.
ai-api
Anthropic API vs Replicate
Side-by-side breakdown.
ai-api
Anthropic API vs Together AI
Side-by-side breakdown.
Staxly is an independent catalog of developer platforms. Outbound links to Anthropic API are plain references to their official pages. Pricing is verified at publication time — reconfirm on the vendor site before buying.