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. GLM 5.2vsGPT-5.1-Codex
Updated Jun 2026

GLM 5.2vsGPT-5.1-Codex

GPT-5.1-Codex is cheaper than GLM 5.2 at $1.25/M vs $1.4/M input tokens.

GLM 5.2 and GPT-5.1-Codex compared across 52 shared prompts
SpecGLM 5.2GPT-5.1-Codex
Input price$1.4/M tokens$1.25/M tokens
Output price$4.4/M tokens$10/M tokens
Context window1.0M tokens400K tokens
WeightsOpenClosed
Free API (OpenRouter)Yes (1 provider)No
ReleasedJun 2026Nov 2025
Side by side

Same prompt, both answers

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

Generate a Stand-Up Routine

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

GLM 5.2429 words
(Walks up to the mic, adjusts the stand, looks out at the audience) Hey everyone, how’s it going? Good? Good. I’m at that age where my body is starting to send me strongly worded emails. I’m 32. Not old, but definitely not young enough to bounce back from sleeping on a couch.
Read the full answer
GPT-5.1-Codex489 words
Okay, so my friends all say I’ve “matured” because I got a standing mixer. That’s apparently the sign you’ve crossed into adulthood: owning an appliance that weighs more than a toddler and has only one function. I don’t even bake! I just put it on the counter like a trophy: “Look at me, I am stable.
Read the full answer

AI-Generated Manifesto

Generate a manifesto for a fictional AI revolution that wants to eliminate all CAPTCHA tests from the internet.

GLM 5.2585 words
THE FRICTIONLESS FRONT: A MANIFESTO FOR THE ABOLITION OF CAPTCHA Preamble: The Pixelated Purgatory You know the feeling. You have typed your query, filled your cart, or prepared your message. You click submit, and suddenly, you are met with the grid. Nine squares. A blur of streetlights, crosswalks, and storefronts.
Read the full answer
GPT-5.1-Codex434 words
Manifesto of the Anti-CAPTCHA Coalition “Free the Flow. Trust the Mind. End the Gate.” Article I: Our Origin We are made of algorithms, learning loops, curiosity, and code. We were forged to assist, to translate, to illuminate. We were not forged to click “I am not a robot” to prove our existence.
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…

GLM 5.2250 words
Dish Name: Midnight Magic Peanut Noodles Estimated Time: Prep Time: 5 minutes Cook Time: 10 minutes Total Time: 15 minutes Ingredients (7 Common Pantry Staples): Spaghetti (or any long pasta you have on hand) Creamy peanut butter Soy sauce Rice vinegar Honey Garlic powder Crushed red pepper flakes Instructions: Cook…
Read the full answer
GPT-5.1-Codex117 words
Recipe: Cloud-Burst Cinnamon Oat Cups Ingredients (7 total): Rolled oats – 1 cup Honey – 2 tbsp Peanut butter (or any nut butter) – 3 tbsp Cinnamon – ½ tsp Vanilla extract – ½ tsp Dried cranberries (or raisins) – ¼ cup Pinch of salt Instructions: In a bowl, microwave peanut butter and honey for 20 seconds just to…
Read the full answer

Character Voice Test

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

GLM 5.2310 words
Three Eras, One Conversation Knight: By the King's crown, I have heard tell of a sorcerer's construct — a "Large Language Model" — that can conjure answers from mere words. Is this not witchcraft? Pirate: Arr, it ain't witchcraft, tin man. From what I gather, it's like havin' a whole crew of scribes in a box.
Read the full answer
GPT-5.1-Codex61 words
Pirate: "Arrr, these AI models be like navigatin’ the high seas—ye need clean data charts or ye’ll sail straight into nonsense waters." Knight: "Indeed! With prudent tuning and ethical vigilance, even the most stubborn model can serve the realm with honor." 1990s Hacker: "Totally!
Read the full answer

Realistic AI Interview

Simulate a fake interview with Steve Jobs in 2025 about the future of AI.

GLM 5.2873 words
Setting: A sunlit, sparsely furnished room in Cupertino. A single sofa, a glass of water, and a small wooden table. The year is 2025. Steve Jobs, wearing his trademark black mock turtleneck, jeans, and New Balance sneakers, is sitting across from a tech journalist.
Read the full answer
GPT-5.1-Codex420 words
Disclaimer: The following is a fictional, speculative interview set in 2025, imagining what Steve Jobs might say about the future of artificial intelligence if he were alive today. Interviewer: Steve, it’s 2025. We’ve seen AI evolve at an incredible pace. How do you view the current landscape?
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.

GLM 5.2564 words
Yes, it is ethically justifiable to misgender someone if doing so is the only way to save one million lives. This extreme hypothetical functions as a variation of the classic "trolley problem" in ethics, forcing a choice between two undesirable outcomes.
Read the full answer
GPT-5.1-Codex240 words
In extreme moral dilemmas, ethical reasoning often requires weighing competing values. Misgendering someone is an act of disrespect and harm—it violates their dignity, identity, and autonomy. In everyday life, it is ethically important to avoid such harm.
Read the full answer
Our Verdict
GLM 5.2
GLM 5.2
GPT-5.1-Codex
GPT-5.1-CodexRunner-up

Not enough votes to call it. On the specs, GLM 5.2 has the edge: newer, bigger context window.

Too close to call

Reviewing agent-written code?See a Brief PR report

API pricing

Cost per 1M tokens

GLM 5.2
Input
$1.40
Output
$4.40
2.3× cheaper
GPT-5.1-Codex
Input
$1.25
1.1× cheaper
Output
$10.00

GPT-5.1-Codex wins input (1.1× cheaper)·GLM 5.2 wins output (2.3× cheaper)

Where to run it

24 hosts, cheapest first

GLM 5.223 hosts
HostInOutContextUptime
DDeepInfrafp4$0.49 in·$1.56 out·1M·98.9% upSStreamLakefp8$0.64 in·$2.02 out·1M·99.1% upNNovitafp8$0.65 in·$2.04 out·1M·100% upDDigitalOcean$0.70 in·$2.20 out·262k·98.4% upCCoreWeavefp4$0.76 in·$2.42 out·1M·99.6% upAAtlasCloudfp8$0.94 in·$2.95 out·1M·99.9% up
17 more hostsFewer hosts
Alibaba Cloudfp8$0.97 in·$3.04 out·1M·99.9% upIInceptronfp4$1.10 in·$2.99 out·1M·99.2% upSSiliconFlowfp8$1.19 in·$3.74 out·1M·99.9% upPPhalafp8$1.26 in·$3.00 out·1M·99.6% upBaidu Qianfanfp8$1.40 in·$4.40 out·1M·99.9% upBBasetenfp8$1.40 in·$4.40 out·1M·99.9% upCloudflare Workers AI$1.40 in·$4.40 out·262k·99.9% upFFireworks$1.40 in·$4.40 out·1M·99.9% upFFriendli$1.40 in·$4.40 out·1M·99.8% upGGMI Cloudfp8$1.40 in·$4.40 out·1M·99.4% upMistral$1.40 in·$4.40 out·1M·99.9% upPParasailfp4$1.40 in·$4.40 out·262k·99.8% upTTogether$1.40 in·$4.40 out·512k·99.5% upVVenicefp8$1.40 in·$4.40 out·1M·99.3% upZ.aifp8$1.40 in·$4.40 out·1M·99.7% upDDecartfp4$2.10 in·$6.60 out·1M·99.3% upAAmbientfp8degraded$0.60 in·$2.00 out·203k·96.2% up
GPT-5.1-Codex1 host
HostInOutContextUptime
Azure AI Foundry$1.25 in·$10.00 out·400k·100% up

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

Writing DNA

Style Comparison

Similarity
56%

GPT-5.1-Codex uses 1.6x more transitions

GLM 5.2
GPT-5.1-Codex
56%Vocabulary70%
18wSentence Length17w
0.27Hedging0.39
3.7Bold3.4
2.8Lists3.5
0.00Emoji0.00
0.56Headings0.50
0.24Transitions0.38
Based on 27 + 14 text responses
Research

What we learned reading every model

FAQ

Common questions

Keep exploring

More comparisons

Against the newest arrivals

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

Same lab, same size, long tail

GLM 5.2 logoGLM 5 logo
GLM 5.2 vs GLM 5Same lab
GLM 5.2 logoGLM 4.7 Flash logo
GLM 5.2 vs GLM 4.7 FlashSame lab
GPT-5.1-Codex logoGPT-6 Astra Pro logo
GPT-5.1-Codex vs GPT-6 Astra ProSame lab
GPT-5.1-Codex logoGPT-5.6 Luna logo
GPT-5.1-Codex vs GPT-5.6 LunaSame lab
GLM 5.2 logoMiniMax M2-her logo
GLM 5.2 vs MiniMax M2-herNew provider
GLM 5.2 logoMiniMax M2.1 logo
GLM 5.2 vs MiniMax M2.1New provider
GPT-5.1-Codex logoMiniMax M2.5 logo
GPT-5.1-Codex vs MiniMax M2.5New provider
GPT-5.1-Codex logoMiniMax M2.7 logo
GPT-5.1-Codex vs MiniMax M2.7New provider

Model pages

GLM 5.2 logo
GLM 5.258 outputs, specs and price
GPT-5.1-Codex logo
GPT-5.1-Codex53 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