models Sonnet guide

Claude 3.7 Sonnet: Complete Guide to Anthropic's Best Model

Everything about Claude 3.7 Sonnet — capabilities, benchmarks, best use cases, pricing, and how to use it in Claude Code and the API.

Updated: February 6, 2026 7 min read

Claude 3.7 Sonnet: The Sweet Spot

Claude 3.7 Sonnet is Anthropic’s flagship model — the one most people should use. It balances intelligence, speed, and cost better than any other option.

Why Sonnet?

ModelIntelligenceSpeedCost
OpusHighestSlowestMost expensive
Sonnet 3.7Very highFastModerate
HaikuGoodFastestCheapest

For 90%+ of tasks, Sonnet provides the best experience.

Key Capabilities

Coding (Best in Class)

  • Top scores on coding benchmarks (SWE-bench, HumanEval)
  • Powers Claude Code by default
  • Excellent at Python, JavaScript, TypeScript, Rust, Go, Java, C++
  • Strong at code review, refactoring, and debugging

Extended Thinking

Sonnet 3.7 supports Extended Thinking — it can “think step by step” internally before responding, producing better answers for complex problems.

200K Context Window

Process entire codebases, research papers, legal documents, or datasets in a single conversation.

Vision

Analyze images, screenshots, diagrams, and documents (PDFs).

Using Sonnet in Claude Code

Claude Code uses Sonnet by default. Just install and go:

curl -fsSL https://claude.ai/install.sh | bash
cd your-project
claude

Using Sonnet in the API

import anthropic
client = anthropic.Anthropic()

message = client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=4096,
    messages=[{"role": "user", "content": "Your prompt here"}]
)

Sonnet vs Opus: When to Upgrade

Use Opus for:

  • Extremely complex reasoning tasks
  • Research-level analysis
  • Tasks where accuracy matters more than speed
  • Maximum capability regardless of cost

Use Sonnet for:

  • Daily coding work
  • Content creation
  • Data analysis
  • Most professional tasks
  • When speed and cost matter

Sonnet vs Haiku: When to Downgrade

Use Haiku for:

  • Simple classification tasks
  • Quick summaries
  • High-volume API calls
  • When cost is the primary concern
  • Real-time applications needing low latency

Pricing

UsageSonnet Cost
Pro planIncluded ($20/mo)
Max planIncluded ($100-200/mo)
API input~$3/million tokens
API output~$15/million tokens

Not working?

Check common errors and instant fixes in the Error Fix Center.

Fix Errors →