Claude Sonnet 5
Claude Sonnet 5 is the most agentic Sonnet model yet from Anthropic, with gains over Claude Sonnet 4.6 across reasoning, tool use, coding, and knowledge work. Claude Sonnet 5 makes plans, uses tools like browsers and terminals, runs autonomously, and is available on AI Gateway via anthropic, vertexAnthropic, bedrock.
import { streamText } from 'ai'
const result = streamText({ model: 'anthropic/claude-sonnet-5', prompt: 'Why is the sky blue?'})Frequently Asked Questions
What's new in Claude Sonnet 5 compared with Claude Sonnet 4.6?
Claude Sonnet 5 improves on Claude Sonnet 4.6 across reasoning, tool use, coding, and knowledge work. Anthropic reports strict gains on agentic search and computer use evaluations, plus lower hallucination and sycophancy rates.
How do effort levels work on Claude Sonnet 5?
Effort controls how deeply Claude Sonnet 5 reasons per request, from efficient low-effort responses to an extra-high
xhighlevel. Higher effort can match Opus-tier output on some tasks; medium effort keeps mixed workloads cost-efficient.Does Claude Sonnet 5 use a new tokenizer?
Yes. Claude Sonnet 5 uses an updated tokenizer, so the same input can produce more tokens than earlier Sonnet models. Re-measure token usage with AI Gateway observability before locking in cost estimates.
What makes Claude Sonnet 5 agentic?
Claude Sonnet 5 makes plans, uses tools like browsers and terminals, and runs autonomously at a level that recently required larger, more expensive models. Anthropic calls Claude Sonnet 5 the most agentic Sonnet model yet.
What context window does Claude Sonnet 5 support?
Claude Sonnet 5 has a context window of 1M tokens and supports up to 128K tokens output tokens per request, at Sonnet pricing.
Does AI Gateway support Zero Data Retention for Claude Sonnet 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 Sonnet 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 Sonnet 5 through AI Gateway?
Set the model to
anthropic/claude-sonnet-5in 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, vertexAnthropic, bedrock.