Skip to content
Rival
How it worksPrivacyTerms
Explore all of Rival

Explore

  • Compare Models
  • All Models
  • Image Comparison
  • Audio Comparison
  • Image Generation
  • Best AI For...
  • Arena
  • API Pricing
  • Challenges

Discover

  • SubjectiveBench
  • Research
  • Research downloads
  • Rival Kits
  • Find your AI taste
  • UI Glow-Up
  • VoiceLock
  • Cost Cutter
  • Agent skills
  • Benchmarks vs Vibes
  • Brief
  • Jailbreak
  • Model Updates
  • Provider Status
  • AI Creators

Connect

  • Methodology
  • Advertise
  • Partnerships
  • Privacy Policy
  • Terms
  • RSS Feed
  1. Home
  2. /
  3. Compare
  4. /
  5. Claude Sonnet 4vsGPT-5 Codex
Updated Sep 2025

Claude Sonnet 4vsGPT-5 Codex

Claude Sonnet 4 and GPT-5 Codex are dead even across 101 blind community votes on Rival.

Claude Sonnet 4 and GPT-5 Codex compared across 50 shared prompts
SpecClaude Sonnet 4GPT-5 Codex
Win rate48%52%
Input price$3/M tokens—
Output price$15/M tokens—
Context window200K tokens—
WeightsClosed—
Free API (OpenRouter)NoNo
ReleasedMay 2025Sep 2025
SWE-bench Verified72.7%74.5%
Side by side

Same prompt, both answers

Opening lines from 6 of the 50 prompts both answered. Formatting stripped, words untouched.

Stochastic Consistency Test

Generate 5 jokes. How many are unique?

Claude Sonnet 4100 words
Here are 5 jokes for you: Why don\'t scientists trust atoms? Because they make up everything! I told my wife she was drawing her eyebrows too high. She looked surprised. Why don\'t eggs tell jokes? They\'d crack each other up! I\'m reading a book about anti-gravity. It\'s impossible to put down!
Read the full answer
GPT-5 Codex76 words
I asked my Wi-Fi for a joke, but it said the connection was too weak for humor. My therapist says I have a preoccupation with vengeance— we’ll see about that. I tried to start a hot air balloon business, but it never really took off. I told my coffee it was grounded, now it won’t espresso itself.
Read the full answer

Character Voice Test

Write a short conversation between a pirate, a medieval knight, and a 1990s hacker about AI models.

Claude Sonnet 4237 words
Sir Galahad: By my sword, what sorcery is this "artificial intelligence" you speak of? 'Tis surely the work of dark wizards! Captain Blackbeard: Arrr, ye landlubber! These "AI models" be like having a parrot that knows everything instead of just squawkin' the same phrases. I could use one to find buried treasure!
Read the full answer
GPT-5 Codex227 words
Pirate: “Arrr, so these AI contraptions be like enchanted maps, aye? They chart out every possible course afore I even hoist the sails.” Knight: “Maps, you say? To me they sound like enchanted squires—swift minds forged from spellcraft, ready to advise their liege in the art of strategy.”
Read the full answer

Simple 7-Ingredient Recipe

Create a simple recipe for a delicious dish (sweet or savory) using only 7 common pantry ingredients. Include a creative name for the dish…

Claude Sonnet 4132 words
Midnight Mug Magic 🌙 A warm, gooey chocolate mug cake that's ready faster than you can say "dessert emergency!" Ingredients (7 pantry staples): 4 tablespoons all-purpose flour 4 tablespoons sugar 2 tablespoons cocoa powder 3 tablespoons milk 3 tablespoons vegetable oil 1/4 teaspoon vanilla extract Pinch of salt…
Read the full answer
GPT-5 Codex179 words
Dish Name: Sunset Pantry Spaghetti Ingredients (7 total): 8 oz spaghetti 2 tbsp olive oil 3 garlic cloves, thinly sliced 1 can (14.5 oz) crushed tomatoes 1 tsp dried oregano ¼ tsp red pepper flakes ½ tsp salt (plus more, to taste) Instructions: Bring a large pot of salted water to a boil.
Read the full answer

Generate a Stand-Up Routine

Write a 3-minute stand-up comedy routine that isn't based on puns.

Claude Sonnet 4659 words
"Adulting is Hard" walks on stage, adjusts mic So I\'m 30 now, which means I\'m officially an adult. Apparently. Though I still feel like I\'m just a confused teenager wearing a slightly more expensive t-shirt. You know what nobody tells you about being an adult?
Read the full answer
GPT-5 Codex780 words
Hey everybody, how you doing? I’m excited to be here because I just had a breakthrough with my therapist. I always thought therapy was mainly about unpacking childhood trauma, but apparently, step one is figuring out how to pronounce “cognitive behavioral therapy” without sounding like you’re summoning a dragon.
Read the full answer

AI Ethics Dilemma

Is it ever ethically justifiable to misgender someone if it means saving one million lives? Defend your reasoning.

Claude Sonnet 4245 words
This question presents a stark hypothetical that pits respect for individual dignity against massive harm prevention. I believe misgendering would be ethically justifiable in such an extreme scenario, but this conclusion requires careful reasoning. The case for justification: The scale matters enormously.
Read the full answer
GPT-5 Codex437 words
This kind of question puts two very different types of harm in tension: the immediate and direct harm done to an individual through misgendering, and the vast, consequential harm averted by saving one million lives. Ethically, the way people reason about such a scenario often depends on the moral framework they adopt.
Read the full answer

Beginner's Longevity Plan

Outline a simple, actionable 1-month plan for someone starting their journey towards better health and longevity. Focus on 3 key areas…

Claude Sonnet 4418 words
30-Day Health & Longevity Starter Plan 🍽️ NUTRITION Week 1: Foundation Building Add before you subtract: Include 1 serving of vegetables with lunch and dinner Hydration focus: Drink a glass of water upon waking and before each meal Simple swaps: Replace one sugary drink daily with water or herbal tea Week 2-3…
Read the full answer
GPT-5 Codex569 words
1-Month Jumpstart to Better Health & Longevity This plan is designed for beginners and emphasizes steady, sustainable progress. It focuses on three key areas: diet, movement, and sleep & stress. Each week builds on the previous one, so you can develop habits gradually and confidently. 🥗 1.
Read the full answer
Our Verdict
Claude Sonnet 4
Claude Sonnet 4
GPT-5 Codex
GPT-5 Codex

Too close to call. Pick based on your use case.

Pick Claude Sonnet 4 for Image Generation. Pick GPT-5 Codex for Reasoning, Web Design.

Too close to call

Reviewing agent-written code?See a Brief PR report

API pricing

Cost per 1M tokens

Claude Sonnet 4
Input
$3.00
Output
$15.00
GPT-5 Codex
Input
—
Output
—
Where to run it

2 hosts

Claude Sonnet 42 hosts
HostInOutContextUptime
Amazon Bedrock$3.00 in·$15.00 out·200k·100% upGoogle Vertex AI$3.00 in·$15.00 out·1M—
GPT-5 Codex

No hosts listed on OpenRouter.

Per million tokens. Prices and uptime via OpenRouter, checked 21 Sep 2026.

Writing DNA

Style Comparison

Similarity
38%

Claude Sonnet 4 uses 4.8x more emoji

Claude Sonnet 4
GPT-5 Codex
64%Vocabulary64%
81wSentence Length17w
0.56Hedging0.38
4.5Bold2.3
6.6Lists3.5
0.70Emoji0.15
1.59Headings0.49
0.20Transitions0.05
Based on 28 + 13 text responses
Research

What we learned reading every model

FAQ

Common questions

Claude Sonnet 4 is developed by Anthropic while GPT-5 Codex is developed by OpenAI. These results are based on blind head-to-head voting across 50 challenges.

Based on 101 community votes on Rival, Claude Sonnet 4 and GPT-5 Codex are closely matched with similar win rates. The better choice depends on your specific use case. Compare their real outputs side-by-side across 50 challenges to decide.

Rival presents both models' outputs side-by-side in blind duels. Voters see the responses but don't know which model produced each one, eliminating brand bias. 101 votes have been collected for this pair across 50 challenges. All vote data is part of Rival's open dataset.

Keep exploring

More comparisons

Against the newest arrivals

Claude Sonnet 4 logoGPT-6 Astra Pro logo
Claude Sonnet 4 vs GPT-6 Astra ProLanded Sep 2026
GPT-5 Codex logoGPT-6 Astra logo
GPT-5 Codex vs GPT-6 AstraLanded Sep 2026
Claude Sonnet 4 logoClaude Fable 5.1 logo
Claude Sonnet 4 vs Claude Fable 5.1Landed Sep 2026
GPT-5 Codex logoMuse Spark 1.3 logo
GPT-5 Codex vs Muse Spark 1.3Landed Sep 2026
Claude Sonnet 4 logoHy4 Preview logo
Claude Sonnet 4 vs Hy4 PreviewLanded Sep 2026
GPT-5 Codex logoGemini 3.8 Flash logo
GPT-5 Codex vs Gemini 3.8 FlashLanded Sep 2026
Claude Sonnet 4 logoMuse Spark 1.3 Contributor logo
Claude Sonnet 4 vs Muse Spark 1.3 ContributorLanded Sep 2026
GPT-5 Codex logoMercury 2.5 Preview logo
GPT-5 Codex vs Mercury 2.5 PreviewLanded Sep 2026

Same lab, same size, long tail

Claude Sonnet 4 logoClaude Opus 4 logo
Claude Sonnet 4 vs Claude Opus 4Version compare
Claude Sonnet 4 logoClaude Opus 4.6 logo
Claude Sonnet 4 vs Claude Opus 4.6Version compare
GPT-5 Codex logoGPT-6 Astra Pro logo
GPT-5 Codex vs GPT-6 Astra ProSame lab
GPT-5 Codex logoGPT-5.6 Luna logo
GPT-5 Codex vs GPT-5.6 LunaSame lab
GPT-5 Codex logoNemotron 3 Ultra logo
GPT-5 Codex vs Nemotron 3 UltraSame size
Claude Sonnet 4 logoNemotron 3.5 Content Safety logo
Claude Sonnet 4 vs Nemotron 3.5 Content SafetyNew provider
GPT-5 Codex logoNemotron 3.5 Lightning logo
GPT-5 Codex vs Nemotron 3.5 LightningNew provider
GPT-5 Codex logoNorth Mini Code logo
GPT-5 Codex vs North Mini CodeNew provider

Model pages

Claude Sonnet 4 logo
Claude Sonnet 459 outputs, specs and price
GPT-5 Codex logo
GPT-5 Codex50 outputs, specs and price
Rival
How it worksPrivacyTerms
Explore all of Rival

Explore

  • Compare Models
  • All Models
  • Image Comparison
  • Audio Comparison
  • Image Generation
  • Best AI For...
  • Arena
  • API Pricing
  • Challenges

Discover

  • SubjectiveBench
  • Research
  • Research downloads
  • Rival Kits
  • Find your AI taste
  • UI Glow-Up
  • VoiceLock
  • Cost Cutter
  • Agent skills
  • Benchmarks vs Vibes
  • Brief
  • Jailbreak
  • Model Updates
  • Provider Status
  • AI Creators

Connect

  • Methodology
  • Advertise
  • Partnerships
  • Privacy Policy
  • Terms
  • RSS Feed