Skip to content
  • Models
  • Rankings
  • Ori
OpenRouterOpenRouter
© 2026 OpenRouter, Inc

Product

  • Chat
  • Rankings
  • Benchmarks
  • Apps
  • Discover
  • Models
  • Collections
  • Providers
  • Tools
  • Pricing
  • Business
  • Enterprise
  • Labs

Company

  • About
  • Blog
  • Careers
    Hiring
  • Privacy
  • Terms of Service
  • Trust Center
  • Support
  • Works With OR
  • Data
  • Brand

Developer

  • Documentation
  • API Reference
  • Developer Platform
  • Status
  • AI Site Map

Connect

  • Discord
  • GitHub
  • LinkedIn
  • X
  • YouTube
  1. Home
  2. /
  3. Compare

Claude Sonnet 4 vs GPT-5

Compare Claude Sonnet 4 from Anthropic and GPT-5 from OpenAI on key metrics including benchmarks, price, context length, and other model features. Access both models and hundreds of others through the OpenRouter API.

Claude Sonnet 4 vs GPT-5: side-by-side summary

Claude Sonnet 4 and GPT-5 are available through the OpenRouter API, so switching between them takes a model slug change rather than a new integration.

Claude Sonnet 4, from Anthropic, has a 200,000-token context window and is priced at $3/M tokens input, $15/M tokens output on OpenRouter.

GPT-5, from OpenAI, has a 400,000-token context window and is priced at $1.25/M tokens input, $10/M tokens output on OpenRouter.

Context window
  • Claude Sonnet 4: 200,000 tokens
  • GPT-5: 400,000 tokens
Price
  • Claude Sonnet 4: $3/M tokens input, $15/M tokens output
  • GPT-5: $1.25/M tokens input, $10/M tokens output
Provided by
  • Claude Sonnet 4: Anthropic
  • GPT-5: OpenAI
Favicon for anthropic
Claude Sonnet 4
Favicon for openai
GPT-5
Favicon for anthropic
Claude Sonnet 4
Favicon for openai
GPT-5

Overview

Claude Sonnet 4
Author
Anthropic
GPT-5
Author
OpenAI
Claude Sonnet 4
Context length
200Ktokens
GPT-5
Context length
400Ktokens
Claude Sonnet 4
Reasoning
GPT-5
Reasoning
Claude Sonnet 4
Input modalities
GPT-5
Input modalities
Claude Sonnet 4
Output modalities
GPT-5
Output modalities
model details, providers and pricing
model details, providers and pricing
Claude Sonnet 4
GPT-5

Claude Sonnet 4 vs GPT-5 at a glance

Claude Sonnet 4 vs GPT-5 comparison
Claude Sonnet 4GPT-5
Input price$3/M tokens$1.25/M tokens
Output price$15/M tokens$10/M tokens
Context window200,000 tokens400,000 tokens
Intelligence IndexNot availableNot available
Coding Index37.637.8
Agentic IndexNot availableNot available
Latency (p50)2.11 s4.82 s
Throughput (p50)Not available73.0 tok/s

Oct 5, 2026

Which has the longer context window, Claude Sonnet 4 or GPT-5?

GPT-5 has the longer context window at 400,000 tokens, compared with 200,000 tokens for Claude Sonnet 4.

Which scores higher on coding, Claude Sonnet 4 or GPT-5?

GPT-5 scores higher on coding, with an Artificial Analysis Coding Index of 37.8 compared with 37.6 for Claude Sonnet 4.

Attribute
Benchmark data updated
Frequently asked questions