Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

How Claude Opus 5 performs*
What Claude Opus 5 costs to run
Test Claude Opus 5
with Gateway’s Simulator
See a prompt's output, token spend, latency, and more with Claude Opus 5.
Route requests to Claude Opus 5 in minutes
1$ pip install merge-gateway-sdk1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6 model="openai/gpt-5.2",
7 input=[
8 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10 ],
11)
12
13print(response.output[0].content[0].text)1response = client.responses.create(
2 model="anthropic/claude-sonnet-4-20250514",
3 input=[
4 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)1from openai import OpenAI
2
3client = OpenAI(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/openai",
6)1response = client.chat.completions.create(
2 model="gpt-5.2",
3 messages=[
4 {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)
8
9print(response.choices[0].message.content)1npm install merge-gateway-ai-sdk-provider ai1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4 apiKey: "YOUR_API_KEY",
5});1import { generateText } from "ai";
2
3const { text } = await generateText({
4 model: gateway("openai/gpt-4o"),
5 prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4 apiKey: "YOUR_API_KEY",
5 baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged1from anthropic import Anthropic
2
3client = Anthropic(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9 model="claude-sonnet-4-20250514",
10 max_tokens=1024,
11 messages=[
12 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13 ],
14)
15
16print(message.content[0].text)Explore other models available in Merge Gateway
Claude Opus 5 FAQ
Heading
What other models does Anthropic offer?
Anthropic ships a tiered Claude family so teams can match model capability to task complexity and budget. Here are some other models Anthropic supports:
- Claude Fable 5: Anthropic's frontier-most model, sitting above Opus 5 for the hardest reasoning and cybersecurity-adjacent work, priced roughly double Opus 5 per million tokens
- Claude Sonnet 5: the balanced mid-tier release, matching Opus 5's 1M-token context at a fraction of the price, built for teams that want near-flagship coding quality without flagship spend
- Claude Opus 4.8: the prior-generation flagship that Opus 5 replaces as Anthropic's default recommendation, still available at the same rate for teams mid-migration
How does Claude Opus 5 differ from Anthropic's other models?
Opus 5 sits in the upper half of Anthropic's current lineup: behind Fable 5 on raw ceiling, ahead of Sonnet 5 and Haiku 4.5 on reasoning depth and agentic autonomy.
- Context window: Opus 5 matches Fable 5 and Sonnet 5 at 1M tokens, while Haiku 4.5 tops out at 200K, so Opus 5 handles far larger codebases or document sets than the budget tier
- Pricing: Opus 5 holds at $5 input and $25 output per million tokens, half of Fable 5's $10 and $50, several times Sonnet 5's $2 and $10 (through August 2026, then $3 and $15), and a clear step up from Haiku 4.5's $1 and $5
- Benchmark performance: on the Artificial Analysis Intelligence Index, Opus 5 at max effort scores 61, edging out Fable 5's 60, and Anthropic's own evaluations put it more than double Opus 4.8's prior Frontier-Bench result
- Effort control: Opus 5 exposes five effort levels (low, medium, high, xhigh, max) that trade latency and token spend for reasoning depth on a single model, a lever Sonnet 5 and Haiku 4.5 don't offer in the same form
- Use-case fit: vision input, extended thinking, and autonomous multi-step tool use suit agentic coding and computer-use tasks that Haiku 4.5 isn't built for
Opus 5 is the right default for complex agentic coding, long-horizon computer-use tasks, and knowledge work where Fable 5's price premium isn't justified by the task at hand.
What models should I consider using alongside Claude Opus 5?
No single model is optimal for every task. Here are models worth pairing with Claude Opus 5 depending on what your product needs:
- GPT-5.5 when you're already standardized on OpenAI's tool-calling conventions and want a second frontier-grade reasoning model for cross-provider comparison on the same agentic tasks
- Gemini 3.1 Pro Preview when the job is retrieval across very large, multi-document or multimodal context rather than multi-step reasoning
- Grok 4.3 on tasks that need current-events awareness or real-time data grounding, a gap Claude models don't specialize in
- Mistral Medium 3.5 for teams with EU data-residency requirements who need a capable coding model without routing every request through a US-only provider
What are the challenges of using Claude Opus 5 in my product?
Like any production LLM, Claude Opus 5 comes with tradeoffs worth planning for:
- Provider dependency: routing every request straight to Anthropic's API means an outage, or a future deprecation of the claude-opus-5 model ID, can take your product down with it unless you've built a fallback path
- Cost at scale: at $25 per million output tokens, and with Opus 5's extended-thinking traces running notably more verbose in evaluation than the median model tested (Artificial Analysis measured around 100M output tokens against a 63M median across its suite), unmanaged usage compounds fast
- Effort-level tuning: the five-level effort setting shifts both latency and price, so teams need to actively tune it per use case rather than leaving every request on one default, or risk overpaying on simple tasks and underpowering hard ones
- Latency on complex tasks: time to first token stretches into the tens of seconds at higher effort levels (measured around 60 seconds at max effort), which rules Opus 5 out for synchronous, latency-sensitive UI paths without a lower-effort fallback
- Rate limits: frontier-tier capacity is typically more constrained than the budget tier, so bursty agentic workloads can hit throttling sooner than they would on Sonnet 5 or Haiku 4.5
Why should I use Merge Gateway to route LLM requests with Claude Opus 5 and every other model?
Using Claude Opus 5 through Merge Gateway gives you access to the model itself and the infrastructure layer around it:
- One API, every provider: reach Claude Opus 5 and every other major LLM through a single endpoint and API key, and change providers by swapping the model string instead of touching application code
- Intelligent routing and automatic failover: Merge reroutes traffic around Anthropic outages on its own, and cost-, latency-, or quality-based routing policies can cut spend by 40 to 60% with no code changes required
- Cost governance: put hard or soft budgets on projects so Opus 5 spend stays on plan, with every request traceable to a model, project, and tag in one billing dashboard across providers
- Build Your Own Router: define what "best" means for your traffic using curated ML benchmarks or your own eval scores, and the router weighs each available model and picks a winner per request, with a plain-language explanation attached to every decision
- Security and compliance controls: run DLP checks and prompt injection screening before a request ever reaches Anthropic, and enforce per-project model and region policies without building that logic into your application
How can I start routing requests to Claude Opus 5 via Merge Gateway?
Getting Claude Opus 5 running through Merge Gateway takes a few minutes:
1. Create an account and get your API key from the dashboard.
2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.
3. Make your first request using the provider/model format. For Claude Opus 5, the model string is anthropic/claude-opus-5. Swap the model string to route to any other provider without changing anything else.
4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. Your first policy can be as simple as naming Claude Opus 5 as primary with one fallback.
Full setup instructions and SDK references are in the Merge Gateway docs.
Try Claude Opus 5 through Merge Gateway
Route, observe, and control AI requests across providers from one API.


