Claude Opus 4.8 (Fast)
Claude Opus 4.8 (Fast) runs Claude Opus 4.8 in Anthropic's fast mode, a request configuration that allocates more compute for quicker output. Identical model, identical quality, at premium pricing.
View API reference- Input and output price
- Input $10, Output $50, Per 1M tokens
- 24h uptime
- Loading AI Gateway uptimeBase model
import { streamText } from 'ai'
const result = streamText({ model: 'anthropic/claude-opus-4.8-fast', prompt: 'Why is the sky blue?'})Copy link to headingPlayground
Try out Claude Opus 4.8 (Fast) 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 4.8 (Fast)
Copy link to headingProviders
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 |
|---|
Copy link to headingUptime24 hours
Direct request success rate on AI Gateway and per-provider. Uptime reflects the base model. Visit the docs for more info.
Copy link to headingThroughput24 hours
P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.
Copy link to headingLatency24 hours
P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.
Getting started
Call Claude Opus 4.8 (Fast) through AI Gateway with the AI SDK generateText and streamText functions, or through the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs by changing the base URL. AI Gateway authenticates the request and routes it to an available provider.
Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the text generation quickstart.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'anthropic/claude-opus-4.8-fast', prompt: 'Why is the sky blue?', });
console.log(result.text);}
main().catch(console.error);Top-level parameters
The same Claude Opus 4.8 (Fast) request in each API format AI Gateway supports.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'anthropic/claude-opus-4.8-fast', system: 'You are a concise technical assistant.', prompt: 'Summarize the tradeoffs between static generation and SSR.', maxOutputTokens: 1024, });
console.log(result.text);}
main().catch(console.error);Standard parameters like prompt, messages, temperature, and tools work as documented in the AI SDK docs. These are the parameters with model-specific behavior.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID in the form creator/model, e.g. anthropic/claude-opus-4.8-fast. AI Gateway routes the request to an available provider. |
maxOutputTokens | number | No | Hard cap on generated tokens. Claude Opus 4.8 (Fast) supports up to 128,000 output tokens. Reasoning tokens count toward this limit. |
reasoning | 'provider-default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | No | Provider-agnostic reasoning effort, available in AI SDK 7 or later. Maps to the provider’s native reasoning configuration; reasoning settings under providerOptions take precedence when both are set. See the Reasoning section below. |
providerOptions | Record<string, JSONValue> | No | AI Gateway routing options under gateway, plus any provider-native options under the provider’s own namespace — see the table below. |
Input limits
| Input | Formats | Sources | Max count | Max size | Limits |
|---|---|---|---|---|---|
| Text | — | — | — | — | Prompt and response share the 1M-token context window |
| Image | — | URL, base64, Uint8Array | — | — | Sent as image parts in messages; counts as input tokens |
| — | URL, base64, Uint8Array | — | — | Sent as file parts in messages; counts as input tokens |
Provider options
Set AI Gateway routing options under providerOptions.gateway. For provider-specific options, pass them under the provider’s namespace as documented by the AI SDK.
Learn more in the AI SDK anthropic provider docs.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'anthropic/claude-opus-4.8-fast', prompt: 'Why is the sky blue?', providerOptions: { gateway: { only: ['anthropic'], }, }, });
console.log(result.text);}
main().catch(console.error);These AI Gateway routing options apply to every model. Provider-specific options pass through under the provider’s own namespace (for example providerOptions.anthropic) exactly as documented by the AI SDK.
| Parameter | Type | Required | Description |
|---|---|---|---|
providerOptions.gateway.only | string[] | No | Restrict routing to these provider slugs. Requests fail over only within the listed providers. |
providerOptions.gateway.order | string[] | No | Preferred provider order. Listed providers are tried first; unlisted providers remain available as fallbacks. |
providerOptions.gateway.sort | 'cost' | 'ttft' | 'tps' | No | Rank candidate providers by price, time to first token, or tokens per second instead of the default routing order. |
providerOptions.gateway.zeroDataRetention | boolean | No | Route only to providers with a zero-data-retention policy for this model. |
Routing across providers
AI Gateway serves the same model through multiple providers and fails over automatically. order expresses a preference while keeping every provider eligible; only is a hard allowlist — if none of the listed providers are available the request fails instead of falling back.
Options under a provider's own namespace (for example providerOptions.anthropic) are forwarded to that provider with the request. Providers ignore option namespaces that don't apply to them, so it is safe to set provider options alongside gateway routing options.
Reasoning
AI Gateway bridges reasoning across every API format. The AI SDK exposes a provider-agnostic top-level reasoning level (none, minimal, low, medium, high, or xhigh); the Chat Completions and Responses formats take the same effort under reasoning.effort; and the Anthropic Messages format uses a native thinking token budget. Whichever you send, the gateway maps it to the target model’s native configuration, converting between effort levels and token budgets as needed. Reasoning-related settings under providerOptions take full precedence over the top-level reasoning value and are never merged. Reasoning tokens typically count toward your output-token usage, though how they’re reported and billed varies by provider.
Learn more in the AI Gateway reasoning guide.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'anthropic/claude-opus-4.8-fast', prompt: 'Explain the Monty Hall problem step by step.', reasoning: 'high', });
console.log(result.text);}
main().catch(console.error);Image input
Send images alongside text as message parts. Images count as input tokens.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'anthropic/claude-opus-4.8-fast', messages: [ { role: 'user', content: [ { type: 'text', text: 'Describe this image.' }, { type: 'image', image: 'https://example.com/photo.jpg' }, ], }, ], });
console.log(result.text);}
main().catch(console.error);PDF input
Attach PDFs as file parts. Their contents count as input tokens.
import { generateText } from 'ai';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'anthropic/claude-opus-4.8-fast', messages: [ { role: 'user', content: [ { type: 'text', text: 'Summarize this document.' }, { type: 'file', mediaType: 'application/pdf', data: 'https://example.com/document.pdf', }, ], }, ], });
console.log(result.text);}
main().catch(console.error);Tool calling
Expose tools the model can call. Define each tool’s inputs with a Zod schema.
import { generateText, tool } from 'ai';import { z } from 'zod';import 'dotenv/config';
async function main() { const result = await generateText({ model: 'anthropic/claude-opus-4.8-fast', prompt: 'What is the weather in San Francisco?', tools: { getWeather: tool({ description: 'Get the current weather for a location', inputSchema: z.object({ location: z.string() }), execute: async ({ location }) => ({ location, temperatureC: 18 }), }), }, });
console.log(result.text);}
main().catch(console.error);Copy link to headingAbout Claude Opus 4.8 (Fast)
Claude Opus 4.8 (Fast) is Claude Opus 4.8 served in Anthropic's fast mode. Fast mode is not a different model and not a smaller one: it is a configuration of the same model that allocates more compute per request, so responses arrive sooner at identical quality and with identical capabilities.
On Anthropic's own API you opt in per request with a speed setting and a beta header, and the response reports which tier served it. Through AI Gateway you select it by model id instead, calling anthropic/claude-opus-4.8-fast directly.
Everything that defines Claude Opus 4.8 carries over, including the 1M tokens context window, adaptive thinking with configurable effort, tool calling, structured output, and streaming. AI Gateway publishes live latency and throughput metrics on this page, so you can compare against the standard model rather than working from a quoted multiplier.
Interactive work is where this earns its price. Rapid iteration, live debugging, and agent loops that chain many calls all shorten at every step, and the saving accumulates across a run. A single background completion rarely justifies it.
You can integrate Claude Opus 4.8 (Fast) through AI SDK, Chat Completions API, Responses API, Messages API, or other API formats, from TypeScript or Python.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Fast mode is a research preview with gated access, so confirm your account can reach it before you design around it. It also carries a rate limit separate from the standard model's. Exceeding that limit returns a 429 with a retry-after header, and because the limit replenishes continuously the wait is usually short, but your retry logic should still handle it.
- Configuration: Provider coverage is narrower than Claude Opus 4.8, and not for the usual reason. Fast mode is served through Anthropic's own API rather than the cloud resellers, so the providers listed on this page will be a shorter set than the standard model's.
- Configuration: Pricing is a premium over Claude Opus 4.8 and the multiplier applies across the whole context window, including requests past 200K input tokens. It also stacks with prompt caching and data residency multipliers, so the effective rate compounds rather than replacing them. Check the pricing panel on this page before moving a workload across.
- Configuration: Quality is not a reason to choose Claude Opus 4.8 (Fast). The model is the same, so a prompt that answers poorly on Claude Opus 4.8 answers the same way here, only sooner. Change models rather than speed when the output is the problem.
- Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use Claude Opus 4.8 (Fast)
Best for
- Rapid Iteration: Responses a developer waits on directly
- Live Debugging: Interactive surfaces that stall on a standard response
- Long Tool-Call Chains: Runs where a saving on every call accumulates
- Unchanged Output Quality: Claude Opus 4.8 behaviour delivered sooner
Consider alternatives when
- Batch And Background Work: Claude Opus 4.8 costs less when nobody is waiting
- Cost-Driven Workloads: The premium applies across the full context window
- Quality Problems: The same model returns the same answer, only sooner
- Cloud Provider Routing: Fast mode is served through Anthropic's own API
Copy link to headingConclusion
Claude Opus 4.8 (Fast) is Claude Opus 4.8 with more compute allocated per request, which buys latency rather than capability. Point anthropic/claude-opus-4.8-fast at AI Gateway when someone is waiting on each step, and keep batch work on Claude Opus 4.8, where the premium buys nothing a user would notice.
Copy link to headingFrequently Asked Questions
What is fast mode?
A configuration of Claude Opus 4.8 that allocates more compute per request so output arrives sooner. It is not a different model and not a smaller one, and quality and capabilities are identical.
Will Claude Opus 4.8 (Fast) give better answers than Claude Opus 4.8?
No. It is the same model, so the same prompt produces the same quality of answer. Choose Claude Opus 4.8 (Fast) for latency, and a different model if quality is the problem.
How do I use fast mode?
On AI Gateway, call
anthropic/claude-opus-4.8-fastas its own model id. On Anthropic's API directly you opt in per request with a speed setting and a beta header, and the response reports which tier served it.Why do fewer providers serve Claude Opus 4.8 (Fast)?
Fast mode runs on Anthropic's own API rather than the cloud resellers, so the provider list is shorter than Claude Opus 4.8's. See the providers shown on this page.
How much more does fast mode cost?
It is a premium over Claude Opus 4.8, and the multiplier applies across the whole context window, including requests past 200K input tokens. It stacks with prompt caching and data residency multipliers rather than replacing them. See the pricing panel on this page.
Is there a separate rate limit for Claude Opus 4.8 (Fast)?
Yes, separate from the standard model's. Exceeding it returns a 429 with a retry-after header. The limit replenishes continuously, so the wait is usually short, but handle the retry in your client.
Is fast mode generally available?
It is a research preview with gated access. Confirm your account can reach it before designing a workload around it.
What is the context window for Claude Opus 4.8 (Fast)?
The context window is 1M tokens, with up to 128K tokens per response, matching the standard model.
Does Claude Opus 4.8 (Fast) support Zero Data Retention?
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.
Your use is subject to Anthropic's Terms & Privacy Policies.