All models

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, making it suitable for a broad range of applications from routine coding tasks to complex software development projects. Key enhancements include improved autonomous codebase navigation, reduced error rates in agent-driven workflows, and increased reliability in following intricate instructions. Sonnet 4 is optimized for practical everyday use, providing advanced reasoning capabilities while maintaining efficiency and responsiveness in diverse internal and external scenarios. Read more at the [blog post here](https://www.anthropic.com/news/claude-4)

Avg Score

0.0%

1 answers

Avg Latency

6.5s

1 runs

Pricing

$3.00

input

/

$15.00

output

per 1M tokens

Context

1000K

tokens

Alternatives

Models with similar or better quality but different tradeoffs

Same Quality, Cheaper

Models with similar or better performance at a lower cost per token.

Same Quality, Faster

Models with similar or better performance but lower latency.

Same Cost, Better

Models at a similar price point with higher benchmark scores.

Other Models from Anthropic

Compare performance with other models from the same creator

Benchmark Performance

How this model performs across different benchmarks

BenchmarkScoreRank
Westat Test
0.0%
277 / 292

Price vs Performance

Compare cost efficiency across all models

Current model
Other models
X-axis uses log scale for better visualization of price range

Score Over Time

Performance trends across all benchmark runs

Benchmark Activity

Number of benchmark runs over time

Quickstart

Get started with this model using OpenRouter

View on OpenRouter
import { OpenRouter } from "@openrouter/sdk";

const openrouter = new OpenRouter({
  apiKey: "<OPENROUTER_API_KEY>"
});

const completion = await openrouter.chat.completions.create({
  model: "anthropic/claude-sonnet-4",
  messages: [
    {
      role: "user",
      content: "Hello!"
    }
  ]
});

console.log(completion.choices[0].message.content);

Get your API key at openrouter.ai/keys