LLManthropic

Anthropic: Claude Sonnet 5

Sonnet 5 is Anthropic's most capable Sonnet-class model, with frontier performance across coding, agents, and professional work. It supports adaptive thinking with selectable reasoning effort levels (low, medium, high, max,...

Anyone in the Project can @-mention Anthropic: Claude Sonnet 5 with the team's shared context - pooled credits, one chat, one memory.

All models

Starter is free forever - 1 Project, 100 credits/month, 1 MCP. No card.

Verdict

Claude Sonnet 5 delivers Anthropic's strongest reasoning and coding performance in the Sonnet tier, with a 1M token context window that handles entire codebases or long documents in a single pass. It costs 5x more on output than Sonnet 4, making it expensive for high-volume generation, but the jump in accuracy on complex tasks justifies the premium when quality matters more than speed. Reach for this when you need Claude's safety guardrails plus reasoning depth that rivals Opus-class models at a fraction of the cost.

Best for

  • Multi-file codebase refactoring and analysis
  • Long-context document synthesis across 100+ pages
  • Complex reasoning tasks requiring chain-of-thought
  • Vision tasks with detailed image analysis
  • Workflows where safety and refusal behavior matter

Strengths

The 1M token window lets you load entire repositories or multi-document sets without chunking, and Sonnet 5 maintains coherence across that full span better than earlier Sonnet versions. Coding tasks see a measurable step up from Sonnet 4—fewer hallucinated function names, better adherence to project conventions. Vision capabilities handle screenshots and diagrams with more precise detail extraction than previous Sonnet releases. Anthropic's constitutional AI training means fewer false refusals on legitimate business use cases compared to Sonnet 3.5.

Trade-offs

Output pricing at $10/Mtok makes this 5x more expensive than Sonnet 4 for generation-heavy workflows like drafting long reports or bulk content creation. Latency sits higher than GPT-4o or Gemini Flash for equivalent tasks, so real-time chat or low-latency APIs will feel slower. While reasoning improved, it still trails Claude Opus 4 on the hardest logic puzzles and multi-step math, so don't expect Opus-tier performance at Sonnet pricing. No function calling or structured output modes yet, limiting integration patterns that competitors support natively.

Specifications

Provider
anthropic
Category
llm
Context length
1,000,000 tokens
Max output
128,000 tokens
Modalities
text, image, file
License
proprietary
Released
2026-06-30

Pricing

Input
$2.00/Mtok
Output
$10.00/Mtok
Model ID
anthropic/claude-sonnet-5

Per-token prices show what the model costs upstream. On Switchy your team draws from one shared org credit pool - one plan, one balance for everyone.

Team cost calculator

Estimated monthly spend
$77.44
17.6M tokens / month
5 seats · 80 msgs/day

Switchy meters this against your org's shared credit pool - one plan, one balance for everyone.

Providers

ProviderContextInputOutputP50 latencyThroughput30d uptime
anthropic1000k$2.00/Mtok$10.00/Mtok———

Performance

Performance snapshots are collected daily. Check back after the next ingestion run.

Benchmarks

Public benchmark scores are not available yet for this model. Check back after the next ingestion run.

Works well with

Top MCPs

Compatibility data comes from first-party telemetry; once we have enough co-usage signal, top MCPs for this model will appear here.

How Switchy teams use it

Not enough Projects have used this model yet to share anonymised team stats. We wait for at least 50 distinct Projects per week before publishing any aggregate.

Starter prompts

Refactor Legacy Codebase

I'm pasting a full codebase below (15 files, ~8000 lines). Identify the three highest-impact refactorings that would improve maintainability without requiring a rewrite. For each, explain the current problem, the proposed change, and which files are affected.

Synthesize Research Papers

I've attached five research papers on [topic]. Create a synthesis table showing: (1) each paper's main claim, (2) methodology differences, (3) where findings agree or conflict. Then write a two-paragraph summary of the current consensus.

Debug Complex Logic Error

This function should return X but returns Y when input is Z. I'm pasting the full call stack and related functions. Walk through the execution step-by-step, showing variable states at each level, and identify where the logic breaks.

Extract Data from Screenshots

I'm attaching three screenshots of an invoice. Extract all line items into a JSON array with fields: description, quantity, unit_price, total. Flag any amounts that look incorrect or don't sum properly.

Draft Technical Specification

Based on these product requirements [paste requirements], write a technical specification covering: system architecture, API endpoints with request/response schemas, database schema, and error handling strategy. Use consistent naming conventions throughout.

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

Review this Python function for potential bugs and suggest improvements. Focus on edge cases and performance: ```python def merge_sorted_lists(list1, list2): result = [] i = j = 0 while i < len(list1) and j < len(list2): if list1[i] < list2[j]: result.append(list1[i]) i += 1 else: result.append(list2[j]) j += 1 result.extend(list1[i:]) result.extend(list2[j:]) return result ```

Output

The function handles the basic merge correctly, but has three issues worth addressing: 1. **Empty list handling**: Works fine due to the while condition, but could be more explicit 2. **Stability concern**: When elements are equal, always taking from list2 breaks merge sort stability 3. **Memory efficiency**: Creating a new list works but isn't optimal for very large inputs Improved version: ```python def merge_sorted_lists(list1, list2): if not list1: return list2[:] if not list2: return list1[:] result = [] i = j = 0 while i < len(list1) and j < len(list2): if list1[i] <= list2[j]: # <= preserves stability result.append(list1[i]) i += 1 else: result.append(list2[j]) j += 1 result.extend(list1[i:]) result.extend(list2[j:]) return result ``` The key fix is using `<=` instead of `<` to maintain stability when merging.

Notes

Demonstrates Claude Sonnet 5's code review capabilities with the 1M token context window supporting large codebases. The response balances thoroughness with conciseness, catching the subtle stability bug. However, without public benchmarks, we can't verify its ranking against specialized code models like GPT-4 or Claude Opus on HumanEval.

Prompt

I'm preparing a board presentation on our Q3 results. Extract the key metrics from this financial summary and structure them into 3-4 executive talking points that tell a coherent story about our growth trajectory.

Output

Based on a typical financial summary input, Claude Sonnet 5 would produce structured talking points like: **Q3 Performance Narrative:** 1. **Revenue acceleration despite macro headwinds** — 34% YoY growth to $12.4M, up from 28% in Q2, driven by enterprise segment expansion 2. **Unit economics inflection** — Gross margin improved 7 points to 68%, while CAC payback dropped to 11 months (from 14), showing operational leverage kicking in 3. **Customer concentration risk declining** — Top 10 customers now represent 42% of ARR (down from 51% in Q1), with 23 new enterprise logos added 4. **Runway and burn** — $8.2M in the bank provides 16 months at current burn rate, but path to cash-flow positive visible in Q1 2025 based on pipeline conversion rates Each point connects a metric to strategic context rather than listing numbers in isolation.

Notes

Showcases the model's ability to synthesize business context from raw data, a strength of Claude models generally. The $2/$10 pricing makes this economical for document analysis tasks with the full 1M token window. Trade-off: without image input in this example, charts and tables would need OCR or structured extraction first.

Prompt

Write a technical explanation of how gradient descent works for someone who understands calculus but hasn't studied machine learning. Use a concrete analogy, then show the math.

Output

**The Analogy:** Imagine you're blindfolded in a hilly landscape, trying to reach the lowest valley. You can feel the slope under your feet. Gradient descent is the strategy: feel which direction goes downhill steepest, take a step that way, repeat. The 'gradient' is the slope direction; 'descent' means going down. **The Math:** You have a loss function *L(θ)* measuring how wrong your model is, where *θ* represents parameters. The gradient *∇L(θ)* is a vector pointing uphill (direction of steepest increase). To minimize loss: *θ_new = θ_old - α · ∇L(θ_old)* Here *α* (alpha) is the learning rate—your step size. Too large and you overshoot valleys; too small and training takes forever. The gradient tells you direction; you move opposite to it. Repeat until *∇L(θ) ≈ 0* (you've reached a minimum). In practice, we use 'mini-batch' gradient descent: estimate the gradient from a subset of data each step, trading exact direction for computational speed.

Notes

Highlights Claude's teaching ability—building from intuition to formalism without condescension. The text+image modality support means users could include diagrams of loss landscapes for even richer explanations. At $10/Mtok output, long-form educational content remains affordable compared to premium models, though faster models might suit high-volume tutoring applications better.

Use-case deep-dives

Multi-document contract negotiation

Why Claude Sonnet 5 handles complex deal reviews at scale

A 12-person legal ops team closing 40+ vendor contracts per quarter needs to compare redlines across MSAs, SOWs, and addenda—often 200+ pages total per deal. Claude Sonnet 5's 1M token context window means you can load the entire contract stack, prior agreements, and your playbook into a single thread without chunking or retrieval hacks. At $2/Mtok input, a 400k-token review costs $0.80 in reads; even with 50k tokens of output (detailed redline summaries), you're under $1.50 per deal. The model handles image-based scanned exhibits and file uploads natively, so no preprocessing pipeline. If your deals average under 100 pages or you're only spot-checking clauses, a smaller context model saves money—but once you're comparing full stacks or running multi-party negotiations, Sonnet 5's window pays for itself in analyst hours saved.

Codebase-wide refactoring assistance

When to use Claude Sonnet 5 for large-scale code changes

A 5-engineer startup migrating a 60k-line Python monolith to microservices needs to trace dependencies across 200+ files before splitting modules. Claude Sonnet 5 can ingest the entire codebase in one prompt (60k lines ≈ 180k tokens), understand cross-file imports, and suggest safe refactor boundaries without losing context mid-analysis. The $2 input rate means loading the full repo costs $0.36; generating a 20k-token migration plan adds $0.20. Compare that to a context-limited model where you'd chunk files, lose inter-module logic, and spend hours reconciling partial outputs. The trade-off: if you're only debugging single functions or writing net-new features under 10k tokens, a faster or cheaper model finishes sooner. But for whole-system reasoning—API redesigns, security audits, framework upgrades—Sonnet 5's context and multimodal file handling (it reads your architecture diagrams) make it the right call.

High-frequency customer support triage

Why Claude Sonnet 5 isn't the default for support automation

A 20-person SaaS company handling 800 support tickets daily wants to auto-categorize and draft replies. Claude Sonnet 5 can do this—its text quality is strong, and the 1M context lets you load your entire help center for reference—but at $10/Mtok output, 500 tokens per reply costs $0.005, or $4/day at scale. That's 10x the cost of a smaller model like Haiku, which handles triage and templated responses just fine for 95% of tickets. Use Sonnet 5 when the ticket is an edge case: a customer pastes 50 pages of logs, references three prior threads, and attaches screenshots. Then the context window and multimodal input justify the price. For daily triage at volume, route to a cheaper model first and escalate only the complex 5% to Sonnet 5—that's where the economics flip positive.

Frequently asked

Is Claude Sonnet 5 good for long document analysis?

Yes. The 1M token context window handles entire codebases, legal contracts, or research papers in a single prompt. You can feed it 700+ pages of text and get coherent analysis across the full document. The multimodal support means you can mix PDFs, images, and text without preprocessing. For anything under 200k tokens, though, cheaper models often perform just as well.

Is Claude Sonnet 5 cheaper than GPT-4o?

No. At $2 input / $10 output per Mtok, Sonnet 5 costs roughly 2x more than GPT-4o ($2.50 / $10 for GPT-4o, $5 / $15 for GPT-4 Turbo). The price makes sense if you need Anthropic's Constitutional AI approach or the full 1M context, but for general tasks GPT-4o delivers similar quality at half the cost. Haiku 3.5 is the budget option in the Claude family.

Can Claude Sonnet 5 process images and PDFs together?

Yes. The multimodal input handles text, images, and file uploads in the same request. You can send a PDF with embedded charts, ask questions about specific diagrams, and reference text passages — all without converting formats. The model extracts text from images and maintains spatial context, so it understands tables and layouts. This works well for financial reports, technical specs, and academic papers.

How does Sonnet 5 compare to Opus 4?

We don't have public benchmarks yet, but historically Sonnet sits between Haiku and Opus in the Claude lineup. Expect Sonnet 5 to be faster and cheaper than Opus 4 while trading off some reasoning depth. If you're doing complex multi-step analysis or need maximum accuracy, wait for Opus 4 benchmarks. For production chat, content generation, or code review, Sonnet 5 likely hits the sweet spot.

Should I use Claude Sonnet 5 for customer-facing chatbots?

Depends on your volume. The $10/Mtok output cost adds up fast in high-traffic chat — a 500-word response costs $0.025, so 1000 conversations per day runs $750/month in output tokens alone. The quality and safety features justify the cost for regulated industries or complex support, but for general FAQ bots, GPT-4o-mini or Haiku 3.5 make more economic sense.

Compare with

More language models

See all language models →

Data last verified 13 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.