Anthropic: Claude Sonnet 4

by Anthropic

Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%), Sonnet 4 balances capability and computational efficiency, ma...

Release Date
May 22, 2025
Context Window
1,000,000 tokens
Max Output
64,000 tokens
Input Modalities
imagetextfile

Coding Performance

Coding benchmarks and performance metrics for development tasks

Coding Benchmarks

Artificial Analysis Coding Index

35.9%

Overall coding capability score

LiveCodeBench

44.9%

Real-world coding task performance

SciCode

37.3%

Scientific computing & algorithms

TerminalBench Hard

25.5%

CLI & terminal command generation

LCR (Long Context Reasoning)

44.3%

Understanding large codebases

IFBench

45.4%

Instruction following accuracy

Speed & Efficiency

Output Speed

77.2 tokens/sec

Median output tokens per second

Time to First Token

2.0s

Median responsiveness

Performance metrics from Artificial Analysis

Real-World Usage

Real-world usage statistics from the Kilo Code community

Loading chart...
Loading rankings...

Real-world metrics from the Kilo Code Leaderboard

Pricing

Cost per 1 million tokens

Input Tokens
$3.00
per 1M tokens
Output Tokens
$15.00
per 1M tokens
Blended (3:1 ratio)
$6.00
per 1M tokens

Example Cost

Analyzing a 10,000 line codebase (≈40k input tokens, 10k output tokens) costs approximately $0.2700

Coding Capabilities

Features and parameters relevant to coding tasks

Coding Features

Function Calling
Can call external functions/APIs
Tool Choice
Control over function selection
Structured Outputs
JSON schema validation
Reasoning Tokens
Extended thinking for complex problems

Pricing details from OpenRouter

Technical Details

Architecture and implementation specifications

Model ID
anthropic/claude-sonnet-4
Created
May 22, 2025
Tokenizer
Claude
Input Modalities
image, text, file
Context Window
1,000,000 tokens
Max Completion Tokens
64,000 tokens
Input Price
$3.00 per 1M tokens
Output Price
$15.00 per 1M tokens
Cache Read Price
$0.30 per 1M tokens
Cache Write Price
$3.75 per 1M tokens
Content Moderation
Disabled

Ready to try Anthropic: Claude Sonnet 4?

Install Kilo Code and start using Anthropic: Claude Sonnet 4 for your coding projects today. Choose from 400+ AI models with complete freedom.