# Claude Opus 5

Claude Opus 5 targets long-horizon agentic coding: multi-file features, larger refactors, and end-to-end work that finishes tasks instead of leaving stubs or placeholders.

- **Model ID:** `anthropic/claude-opus-5`
- **Type:** chat
- **Providers:** anthropic, bedrock, vertexAnthropic, claudeaws
- **Context window:** 1,000,000
- **Maximum output tokens:** 128,000
- **Pricing:** $5/1M input tokens, $25/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/claude-opus-5

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'anthropic/claude-opus-5',
  prompt: 'Why is the sky blue?'
})
```

## About

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

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.

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 `models` array under `providerOptions.gateway`, and AI Gateway tries them in order when the primary model fails.

## When to use

### 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

## 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

- **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

## Frequently asked questions

### What is Claude Opus 5 built for?

Claude Opus 5 is built for long-horizon agentic coding. Claude Opus 5 handles multi-file features, larger refactors, and end-to-end feature work, and it completes full tasks rather than leaving stubs or placeholders. Anthropic also reports gains over Claude Opus 4.8 in professional knowledge work and long-horizon reasoning.

### How do I set the reasoning effort for Claude Opus 5?

Reasoning is on by default. In AI SDK 7, set the top-level `reasoning` option to a level from `minimal` up to `xhigh`, or to `none` to turn reasoning off.

### Which effort level should I start with on Claude Opus 5?

Start at low or medium. Claude Opus 5 is effective at both, and they produce quality output while spending fewer tokens than higher settings. Raise the effort level for the requests where output quality falls short.

### What improved in vision on Claude Opus 5?

Charts, documents, diagrams, and UI replication. Claude Opus 5 also uses tools to analyze, crop, and verify visual work, which suits tasks that pair screenshots or design files with code changes.

### How do I enable fast mode for Claude Opus 5?

Pass `speed: 'fast'` in the `anthropic` provider options. In the AI SDK, set `providerOptions.anthropic.speed` to `'fast'` on the request.

### What happens when a safety classifier blocks a request to Claude Opus 5?

The request fails, and AI Gateway falls back to the next model you configured. Claude Opus 5 ships with elevated cybersecurity safeguards, so benign security work can occasionally trigger a classifier. List backup models such as Claude Opus 4.8 and Claude Sonnet 5 in a `models` array under `providerOptions.gateway`. The option works across every AI Gateway API format.

### Which providers back Claude Opus 5 on AI Gateway?

AI Gateway routes Claude Opus 5 through Anthropic, Bedrock, Google Vertex AI, Claude Platform on AWS, with retries and automatic failover. Call `/v1/models/`anthropic/claude-opus-5`/endpoints` on `ai-gateway.vercel.sh` to list every provider serving Claude Opus 5, along with per-provider pricing, supported parameters, uptime, throughput, and latency.

### Does AI Gateway support Zero Data Retention for Claude Opus 5?

Yes, Zero Data Retention is available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.

### What is the pricing for Claude Opus 5?

AI Gateway mirrors provider pricing with no markup and adds no platform fee on inference. Rates are listed on this page and shift when providers update their pricing.

### How do I call Claude Opus 5 through AI Gateway?

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 handles authentication, retries, and failover across `anthropic`, `bedrock`, `vertex`, `claudeaws`.

## Links

- [Model page](https://vercel.com/ai-gateway/models/claude-opus-5)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.anthropic.com/claude/docs/models-overview)
