Claude Sonnet 4

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%),...

by Anthropic

Overview

Quick stats across all benchmark runs.

Score

12 benchmarks

Avg Latency

28.3s

17 requests

Pricing

$3.00 in / $15.00 out

per 1M tokens

Context

1000K

tokens

Alternatives

Models with similar or better quality but different tradeoffs

No alternatives found

Run benchmarks on this model to discover alternatives

Benchmark Performance

How this model performs across different benchmarks

BenchmarkScoreRank
Money Boy Cultural Literacy Test
52%
27 / 107

Price vs Performance

Compare cost efficiency across all models

Current model (baseline)
Other models (relative score)
Y-axis shows score difference from shared benchmarks. X-axis uses log scale.

Score Over Time

Performance trends across all benchmark runs

Benchmark Activity

Number of benchmark runs over time

Get started with this model using 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

Other Models from Anthropic

Compare performance with other models from the same creator

ModelLatencyCost/1MScore
Claude Sonnet 4.520.4s$9.0075%
Claude Opus 4.64.2s$15.0072%
Claude Opus 4.528.8s$15.0058%
Claude Sonnet 4.65.0s$9.0057%
Claude Opus 4.73.5s$15.0053%
Claude Haiku 4.511.1s$3.0047%
Claude 3 Haiku3.5s$0.7543%
Claude 3.5 Haiku7.4s$2.4026%
Claude Opus 460.9s$45.00
Claude Opus 4.179.9s$45.00
Claude 3.5 Haiku (2024-10-22)$2.40
Claude Opus 4.7 (Fast)$90.00
Claude Opus 4.6 (Fast)$90.00
Claude 3.5 Sonnet17.7s$18.00
Claude 3.7 Sonnet16.3s$9.00