# Claude Opus 4.8

Claude Opus 4.8 is built for long-horizon agentic execution, with strength on complex multi-step coding work and knowledge-work writing where clarity of output matters.

- **Model ID:** `anthropic/claude-opus-4.8`
- **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-4.8

## 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-4.8',
  prompt: 'Why is the sky blue?'
})
```

## About

Claude Opus 4.8 became available on AI Gateway on May 28, 2026. Anthropic positions it for long-horizon agentic execution: complex, multi-step coding workflows where the model maintains coherence across many turns, including refactors that previously required human correction mid-task.

For knowledge-work writing, Claude Opus 4.8 produces clearer, less hedgy prose. Anthropic highlights drafting, data analysis, and building presentations as workflows that benefit from this style. Pair it with structured tool calls or memory files in your agent pipeline to keep extended sessions on track.

The sample integration uses adaptive thinking and configurable effort. Set `thinking` to `{ type: 'adaptive' }` and `effort` to `'high'` (or another level) under `providerOptions.anthropic` to control how deeply Claude Opus 4.8 reasons on each request.

Through AI Gateway, Claude Opus 4.8 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-4.8` 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

Adaptive thinking lets Claude Opus 4.8 scale reasoning per request. Pair it with the `effort` parameter when running mixed workloads so the model spends compute where it pays off and stays efficient on simpler turns.

## When to use

### Best For

- **Long-horizon agentic execution:** Multi-step pipelines where the model maintains coherence across many turns and tool calls
- **Complex multi-step coding:** Refactors and feature work that previously required human correction mid-task
- **Knowledge-work writing:** Drafting, data analysis, and presentation building where clearer, less hedgy prose matters
- **Adaptive thinking workloads:** Mixed-complexity requests where letting Claude Opus 4.8 calibrate reasoning depth per turn is more efficient than fixed budgets
- **Production agent infrastructure:** Workflows that benefit from AI Gateway routing across Anthropic, Bedrock, Google Vertex AI, Claude Platform on AWS with retries and failover

### Consider Alternatives When

- **Cost-sensitive high-volume traffic:** Claude Sonnet 4.6 offers Opus-approaching intelligence at Sonnet pricing
- **Latency-critical interactive use:** Claude Haiku 4.5 is faster and cheaper on well-bounded high-throughput requests
- **Fixed thinking budget required:** Claude Opus 4.6 accepts a fixed thinking budget when you need deterministic compute per request

## Best for

- **Long-horizon agentic execution:** Multi-step pipelines where the model maintains coherence across many turns and tool calls
- **Complex multi-step coding:** Refactors and feature work that previously required human correction mid-task
- **Knowledge-work writing:** Drafting, data analysis, and presentation building where clearer, less hedgy prose matters
- **Adaptive thinking workloads:** Mixed-complexity requests where letting Claude Opus 4.8 calibrate reasoning depth per turn is more efficient than fixed budgets
- **Production agent infrastructure:** Workflows that benefit from AI Gateway routing across Anthropic, Bedrock, Google Vertex AI, Claude Platform on AWS with retries and failover

## Consider alternatives

- **Cost-sensitive high-volume traffic:** Claude Sonnet 4.6 offers Opus-approaching intelligence at Sonnet pricing
- **Latency-critical interactive use:** Claude Haiku 4.5 is faster and cheaper on well-bounded high-throughput requests
- **Fixed thinking budget required:** Claude Opus 4.6 accepts a fixed thinking budget when you need deterministic compute per request

## Frequently asked questions

### What is Claude Opus 4.8 built for?

Anthropic positions Claude Opus 4.8 for long-horizon agentic execution: complex, multi-step coding work and knowledge-work writing where the model needs to maintain coherence across many turns and produce clearer prose.

### How do I configure adaptive thinking and effort for Claude Opus 4.8 in the AI SDK?

Set the model to `anthropic/claude-opus-4.8`. Under `providerOptions.anthropic`, set `thinking` to `{ type: 'adaptive' }` and pass an `effort` level (for example, `'high'`).

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

AI Gateway routes Claude Opus 4.8 through Anthropic, Bedrock, Google Vertex AI, Claude Platform on AWS, with retries and automatic failover.

### How is Claude Opus 4.8 useful for coding agents?

Anthropic highlights complex multi-step coding work, including refactors that previously required human correction mid-task. Claude Opus 4.8 is suited for agent pipelines that span many turns and tool calls.

### What knowledge-work tasks does Claude Opus 4.8 target?

Drafting, data analysis, and building presentations. Anthropic describes the prose output as clearer and less hedgy, which makes drafts more useful as a starting point.

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

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 4.8?

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 4.8 through AI Gateway?

Set the model to `anthropic/claude-opus-4.8` 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-4.8)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.anthropic.com/claude/docs/models-overview)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
