Claude Opus 5
Claude Opus 5 is the latest model in Anthropic's Opus family, with gains over Claude Opus 4.8 in agentic coding, professional knowledge work, and long-horizon reasoning. Claude Opus 5 is available on AI Gateway via Anthropic, Bedrock, Google Vertex AI, Claude Platform on AWS with reasoning on by default and configurable effort. Your use is subject to Anthropic's Terms & Privacy Policies.
import { streamText } from 'ai'
const result = streamText({ model: 'anthropic/claude-opus-5', prompt: 'Why is the sky blue?'})Playground
Try out Claude Opus 5 by Anthropic. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Claude Opus 5
Providers
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.
P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.
Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.
More models by Anthropic
| Model |
|---|
About Claude Opus 5
Claude Opus 5 became available on AI Gateway on July 24, 2026 as the latest model in Anthropic's Opus family. Claude Opus 5 improves on Claude Opus 4.8 in agentic coding, professional knowledge work, and long-horizon reasoning. The coding gains show up on multi-file features, larger refactors, and end-to-end feature work, where Claude Opus 5 completes full tasks rather than leaving stubs or placeholders behind.
Reasoning is on by default. In AI SDK 7, set the depth with the top-level reasoning option, from minimal up to xhigh, or none to turn reasoning off. Claude Opus 5 is effective at low and medium effort, which produce quality output while spending fewer tokens than higher settings, so mixed workloads don't need to run at the top of the range.
Vision is stronger on charts, documents, diagrams, and UI replication. Claude Opus 5 uses tools to analyze, crop, and verify visual work, which helps on tasks that pair screenshots or design files with code. Claude Opus 5 also coordinates teams of subagents well, which suits multi-agent pipelines that need one model to plan and delegate.
Elevated cybersecurity safeguards ship with Claude Opus 5, matching Claude Fable 5. Benign security work can occasionally trigger a safety classifier and get blocked. Add a backstop by listing backup models such as Claude Opus 4.8 and Claude Sonnet 5 in a models array under providerOptions.gateway. AI Gateway tries them in order when the primary model fails, and the option works across every AI Gateway API format. Fast mode is available separately: pass speed: 'fast' under providerOptions.anthropic.
Through AI Gateway, Claude Opus 5 is available with the standard unified API, observability, retries, and failover across Anthropic, Bedrock, Google Vertex AI, Claude Platform on AWS. Set the model to anthropic/claude-opus-5 in the AI SDK, Chat Completions API, Responses API, Messages API, or other API formats, from TypeScript or Python. AI Gateway mirrors provider pricing with no markup and adds no platform fee on inference, including for Bring Your Own Key requests.
What To Consider When Choosing a Provider
- Configuration: Reasoning is on by default, and Claude Opus 5 works well at low and medium effort, which spend fewer tokens than higher settings. Start low and raise the effort level only where output quality falls short.
- Configuration: Claude Opus 5 ships with elevated cybersecurity safeguards, so benign security work can occasionally trigger a safety classifier and get blocked. List backup models in a
modelsarray underproviderOptions.gateway, and AI Gateway tries them in order when the primary model fails. - Zero Data Retention: AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
When to Use Claude Opus 5
Best for
- Long-Horizon Agentic Coding: Multi-file features, larger refactors, and end-to-end work spanning many turns
- Complete Task Execution: Finished implementations instead of stubs and placeholder code left for a human
- Visual and Document Analysis: Charts, diagrams, documents, and UI replication where the model inspects images with tools
- Multi-Agent Orchestration: Subagent teams that each own part of a larger task and report back
- Cost-Aware Reasoning Depth: Low and medium effort cover most requests before you reach for higher settings
Consider alternatives when
- Cost-Sensitive Production Traffic: Claude Sonnet 5 delivers strong agentic performance at a lower per-token price
- Latency-Critical Simple Requests: Claude Haiku 4.5 is faster and cheaper on well-bounded, high-throughput calls
- Simpler Refusal Handling: Models without elevated cybersecurity safeguards keep fallback configuration out of your integration
Conclusion
Claude Opus 5 extends the Opus family toward agentic coding that finishes the job: multi-file features, larger refactors, and end-to-end work. Start at low or medium effort, raise it where quality gaps appear, and configure model fallbacks so blocked security requests still return an answer.