Claude API pricing per token: Opus, Sonnet and Haiku costs explained
Claude API pricing has four parts: input tokens, output tokens, cache reads and cache writes. This page lists current per-token prices for every Claude model on apillms, works through what common requests actually cost, and compares them with OpenRouter.
Claude API prices per 1M tokens
| Model | Input / 1M | Output / 1M | Cache read / 1M |
|---|---|---|---|
| claude-opus-5-5 | $0.639 | $3.19 | $0.106 |
| claude-opus-5 | $0.76 | $3.80 | $0.126 |
| claude-sonnet-5 | $0.274 | $1.37 | $0.046 |
| claude-haiku-4-5 | $0.137 | $0.684 | $0.023 |
Prices in USD, updated live from our API. One token is roughly four characters of English text.
What each part means
- Input: everything you send, including the system prompt, tools, files and chat history.
- Output: everything the model writes, including thinking tokens when extended thinking is on. Output costs 5 times the input price on every Claude model.
- Cache read: input that matches a prefix the provider already cached. It is the cheapest line on the bill, which is why agents are affordable at all.
- Cache write: the first time a prefix is stored, billed slightly above normal input.
What real requests cost
| Request | Tokens | Sonnet 5 | Opus 5.5 | Haiku 4.5 |
|---|---|---|---|---|
| A chatbot reply | 2,000 in, 500 out | $0.001 | $0.003 | $0.001 |
| A code review of one file | 15,000 in, 1,500 out | $0.006 | $0.014 | $0.003 |
| A Claude Code agent turn | 10,000 fresh in + 60,000 cached, 2,000 out | $0.008 | $0.019 | $0.004 |
Calculated from the prices above at the time of writing; the token counts are illustrative.
Compared with OpenRouter
| Model | OpenRouter in / out | apillms in / out |
|---|---|---|
| claude-opus-5-5 | $4.00 / $20.00 | $0.639 / $3.19 |
| claude-opus-5 | $5.00 / $25.00 | $0.76 / $3.80 |
| claude-sonnet-5 | $2.00 / $10.00 | $0.274 / $1.37 |
| claude-haiku-4-5 | $1.00 / $5.00 | $0.137 / $0.684 |
apillms prices on this page update live from our API. OpenRouter prices are a snapshot from openrouter.ai on 29 September 2026 and may have changed since; check their site before deciding.
Which Claude model to pick
- claude-sonnet-5: the default for coding agents, chat and most production work.
- claude-opus-5-5: hard reasoning, large refactors, problems where Sonnet stalls. It costs less than Opus 5 here, so prefer it over the older model.
- claude-haiku-4-5: classification, titles, short summaries, high-volume simple calls.
Five ways to lower your Claude bill
- Keep stable content (system prompt, tools, documents) at the start so it is served from cache. See prompt caching explained.
- Set
max_tokensto what you need; output is the expensive side. - Use Haiku for small background jobs instead of Sonnet.
- Clear or compact long conversations so old context is not resent every turn.
- Watch per-request cost in the dashboard and move whatever is expensive and simple to a cheaper model.
How to call Claude through apillms
With the Anthropic SDK, set the base URL:
import anthropic
client = anthropic.Anthropic(base_url="https://apillms.com", api_key="YOUR_KEY")
msg = client.messages.create(model="claude-sonnet-5", max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}])
print(msg.content[0].text)
Or use the OpenAI SDK with base_url="https://apillms.com/v1". For Claude Code, follow the two-minute setup. New accounts get free credits to test; after that you top up from $5 and credits do not expire.
Try apillms
One API key for Claude, GPT, Grok, DeepSeek and Kimi. OpenAI- and Anthropic-compatible, prompt caching included, pay-as-you-go from $5 with PayPal or card. Credits never expire.
FAQ
How much does the Claude API cost per token?
See the live table above: prices are per 1M tokens and differ for input, output and cache reads.
Why is output more expensive than input?
Generating tokens takes more compute than reading them; on every Claude model output costs 5 times the input price.
Which Claude model is cheapest?
claude-haiku-4-5. For most coding and chat work claude-sonnet-5 gives the best value.
Do I need a subscription?
No. apillms uses prepaid credits from $5 that do not expire.