Claude Opus 5 API: Pricing, Context and Setup
Claude Opus 5 API pricing is $5 per 1M input and $25 per 1M output tokens, the same rate as Opus 4.8. See its 1M context, effort tiers, and setup.
Claude Opus 5 is Anthropic's current Opus-tier model, released on July 24, 2026. Its API model ID is claude-opus-5, its context window is 1 million tokens, and standard pricing is $5 per 1M input tokens and $25 per 1M output tokens — the same rate Anthropic charges for Claude Opus 4.8.
Claude Opus 5 is live on RouterPlex through both the OpenAI-compatible /v1/chat/completions endpoint and the Anthropic-compatible /v1/messages endpoint, so the same key reaches Opus 5, GPT-5.6, Gemini and the rest of the catalog.
Sources: Anthropic Claude pricing, What's new in Claude Opus 5, and the Claude model overview, checked July 27, 2026. Prices and limits can change.
Claude Opus 5 API pricing #
| Token category | Price per 1M tokens |
|---|---|
| Standard input | $5.00 |
| 5-minute cache write | $6.25 |
| 1-hour cache write | $10.00 |
| Cache read | $0.50 |
| Output | $25.00 |
The headline number is that the price did not move. Opus 5 is positioned as a substantial capability step over Opus 4.8 while staying at the Opus-tier rate, which makes it the cheaper of the two on a cost-per-completed-task basis whenever it needs fewer retries or shorter agent runs.
Anthropic also offers a research-preview fast mode for Opus 5 at $10 input and $50 output per 1M tokens. That is a first-party Claude API feature, not part of the standard rate, and it is not available through third-party gateways.
See the live Claude Opus 5 API pricing page for the rate RouterPlex bills.
Claude Opus 5 specifications #
| Capability | Claude Opus 5 |
|---|---|
| Model ID | claude-opus-5 |
| Context window | 1M tokens (default and maximum) |
| Maximum output | 128K tokens |
| Vision input | Yes |
| Tool use | Yes |
| Effort levels | low, medium, high, xhigh, max |
| Minimum cacheable prompt | 512 tokens |
| OpenAI- and Anthropic-compatible access on RouterPlex | Yes |
The model ID has no date suffix. Write claude-opus-5 exactly; a constructed ID like claude-opus-5-20260724 will fail.
Four API changes worth knowing before you migrate #
Most launch coverage stops at the benchmark chart. If you are moving an existing Opus 4.8 integration, these behavioural differences matter more than the scores.
Thinking is on by default. On Opus 4.8, omitting the thinking parameter meant the model did not think. On Opus 5, omitting it runs adaptive thinking. Because max_tokens caps thinking *and* response text together, a request that was sized tightly around its answer on Opus 4.8 can now truncate mid-response. Revisit max_tokens on any route that never set thinking.
Disabling thinking is capped at high effort. Sending thinking: {"type": "disabled"} together with effort of xhigh or max returns a 400. The combination is valid on Opus 4.8, so audit every call site rather than just the first one — effort and thinking are validated per request.
The full effort ladder is available. Opus 5 supports low through max with no beta header, and the lower rungs are unusually strong on this model. Effort defaults carried over from an older model are rarely the right setting; sweep it against your own evaluation rather than assuming high.
Prompt caching starts at 512 tokens. Opus 4.8 required a 1024-token prefix before a cache entry was created. Opus 5 halves that, so system prompts you had written off as too short to cache may now cache with no code change. At a $0.50 cache read against $5.00 standard input, that is worth re-checking.
Call Claude Opus 5 with RouterPlex #
The OpenAI-compatible shape works with any OpenAI SDK:
curl https://api.routerplex.com/v1/chat/completions \-H "Authorization: Bearer $ROUTERPLEX_KEY" \-H "Content-Type: application/json" \-d '{"model": "claude-opus-5","messages": [{"role": "user", "content": "Trace this bug across the repository and name the root cause."}]}'
Python uses the same base URL as every other model in the catalog:
import osfrom openai import OpenAIclient = OpenAI(api_key=os.environ["ROUTERPLEX_KEY"],base_url="https://api.routerplex.com/v1",)response = client.chat.completions.create(model="claude-opus-5",messages=[{"role": "user", "content": "Review this migration plan for irreversible steps."}],)print(response.choices[0].message.content)
Use Claude Opus 5 in Claude Code #
Claude Opus 5 is reachable through the Anthropic-compatible /v1/messages endpoint, so Claude Code and the official Anthropic SDKs point straight at RouterPlex with no router or proxy in between:
export ANTHROPIC_BASE_URL=https://api.routerplex.comexport ANTHROPIC_AUTH_TOKEN=$ROUTERPLEX_KEYexport ANTHROPIC_MODEL=claude-opus-5
Thinking blocks, tool use and prompt caching all pass through in the native Anthropic format. The full walkthrough is in the Claude Code setup guide, and the billing comparison against a subscription is in Claude Code pricing.
Claude Opus 5 vs Opus 4.8, Fable 5 and Sonnet 5 #
| Model | Input / 1M | Output / 1M | Context | Best fit |
|---|---|---|---|---|
| Claude Opus 5 | $5 | $25 | 1M | Current Opus default for agents and hard coding work |
| Claude Opus 4.8 | $5 | $25 | 1M | Stable baseline for integrations already tuned to it |
| Claude Fable 5 | $10 | $50 | 1M | Highest-capability tier, twice the Opus rate |
| Claude Sonnet 5 (introductory) | $2 | $10 | 1M | Cheapest strong Claude for volume coding and agent work |
Opus 5 and Opus 4.8 cost the same, so there is no pricing reason to stay on 4.8 — only the migration cost of re-testing the behavioural changes above. Fable 5 remains the escalation target when a task genuinely needs it, at double the rate.
Against Claude Sonnet 5, the gap is 2.5x on both input and output. For high-volume work where a cheaper model already succeeds, that difference compounds quickly.
Control Opus 5 spend before the first request #
At $25 per 1M output tokens, a long-running agent can consume a balance faster than expected — and thinking now being on by default means output token counts will be higher than the equivalent Opus 4.8 request. Three practical controls:
- Give the Opus 5 key its own hard budget so a runaway loop cannot drain the account balance.
- Set
effortdeliberately. Start lower than you think you need and raise it where evaluation shows a real difference. - Reuse stable system prompts and tool definitions so the 512-token cache minimum can actually earn you the $0.50 cache-read rate.
Test it against a real task #
Pick a task where a better result has measurable value, then run the same input through Opus 5, Opus 4.8 and Sonnet 5. Compare correctness, review time and final billed cost rather than benchmark headlines — your prompt structure, tools and error tolerance decide which price-quality point wins.
Create a RouterPlex key with a hard budget, or compare Opus 5 with Claude Fable 5 and Kimi K3 through the same endpoint.
Frequently asked questions
How much does the Claude Opus 5 API cost?
Anthropic lists Claude Opus 5 at $5 per 1M input tokens and $25 per 1M output tokens, with cache reads at $0.50 per 1M. That is the same standard rate as Claude Opus 4.8.
What is the Claude Opus 5 context window?
Claude Opus 5 has a 1M-token context window, which is both the default and the maximum, and supports up to 128K output tokens per request.
What is the Claude Opus 5 model ID?
The API model ID is claude-opus-5. It carries no date suffix, so do not append one.
Is Claude Opus 5 more expensive than Claude Opus 4.8?
No. Both are $5 per 1M input and $25 per 1M output tokens on standard pricing. Opus 5 also lowers the minimum cacheable prompt to 512 tokens, so short prompts that could not be cached on Opus 4.8 can now create cache entries.
Claude Opus 5 or Claude Fable 5?
Claude Fable 5 costs $10 input and $50 output per 1M tokens, twice the Opus 5 rate. Start on Opus 5 and escalate to Fable only when a measured evaluation shows the harder model changes the outcome on your task.
Can I use Claude Opus 5 without an Anthropic account?
Yes. Gateways that expose an OpenAI- or Anthropic-compatible endpoint can route claude-opus-5 requests. On RouterPlex it is callable from one prepaid balance through both /v1/chat/completions and /v1/messages.
Run the smallest paid test.
Add $5, cap the key, and verify the result with your own workload.