VynarisEarly betaGet your API key

GLM 5.2 vs Claude Opus 4.8 vs GPT-5.5: per-task cost with the open-weights discount

GLM 5.2 runs 15-25% of Claude Opus 4.8 and GPT-5.5 per task: per-token and per-task math verified 2026-07-15, plus when frontier still wins.

On the same task, GLM 5.2 costs $137 per 1,000 agentic runs against $540 for Claude Opus 4.8 and $567 for GPT-5.5 — roughly a quarter of the frontier bill for the same work. That is the number behind the "AI margin collapse" argument doing the rounds on Hacker News. Prices verified 2026-07-15. Below is the per-token and per-task math, and the honest list of jobs where the expensive model still wins.

Verdict

Model            Input $/1M  Output $/1M  Cost /1,000 agentic tasks  Pick it when
---------------  ----------  -----------  -------------------------  --------------------------------------------------
GLM 5.2 (z.ai)   $1.40       $4.40        $137.16                    Cost is the constraint and quality clears your bar
Claude Opus 4.8  $5.00       $25.00       $540.00                    Hardest reasoning; Anthropic-native tooling/SLA
GPT-5.5          $5.00       $30.00       $567.00                    Hardest reasoning; OpenAI-native stack

Per-token, GLM 5.2's input is 28% of both frontier models ($1.40 vs $5.00) and its output is 18% of Opus ($4.40 vs $25.00) and 15% of GPT-5.5 ($4.40 vs $30.00). The agentic task above is 81,000 input and 5,400 output tokens, no caching (derivation below). GLM 5.2 first-party pricing is from z.ai; Opus 4.8 and GPT-5.5 from our archived snapshot, both re-verified 2026-07-15.

The discount is not one number

"A fifth of the price" is the headline, but the real discount depends on the shape of your work, because GLM 5.2's input token is a larger fraction of frontier input (28%) than its output token is of frontier output (15-18%). Output-heavy jobs get the deepest cut; input-heavy agentic loops get the shallowest.

Task shape                                    GLM 5.2 /1k  Opus 4.8 /1k  GPT-5.5 /1k  GLM as % of frontier
--------------------------------------------  -----------  ------------  -----------  --------------------
Output-heavy generation (4k in / 4k out)      $23.20       $120.00       $140.00      17-19%
Balanced RAG/chat (20k in / 4k out)           $45.60       $200.00       $220.00      21-23%
Input-heavy agentic loop (81k in / 5.4k out)  $137.16      $540.00       $567.00      24-25%

All figures USD per 1,000 tasks, equal token counts, no caching, prices verified 2026-07-15. The pattern is consistent: the more your workload leans on output tokens, the closer GLM 5.2 gets to one-sixth of the frontier price; the more it leans on input tokens re-sent through a tool loop, the closer it drifts to one-quarter. Either way the gap is large, but "83% less" and "75% less" are different budget conversations.

GLM 5.2 vs Opus 4.8 vs GPT-5.5, cost per 1,000 agentic tasks
Cost per 1,000 tasks, agentic loop (81k in / 5.4k out), no caching. Prices verified 2026-07-15.

The agentic row is built from six model calls, each re-sending a 12,000-token stable prefix plus 1,500 fresh tokens (6 x 13,500 = 81,000 input) and emitting 900 tokens (6 x 900 = 5,400 output). If your loop uses prompt caching on the prefix, the input side shrinks on all three models and the absolute gap narrows, though the ratio holds. Run your own token shape through the calculator before you commit a routing decision.

The tokenizer footnote that widens the gap

Sticker prices assume a token is a token. It is not. Opus 4.8 uses Anthropic's newer tokenizer, which the pricing docs state emits "approximately 30% more tokens for the same text" than the older Claude tokenizer. That is an Anthropic-versus-older-Anthropic figure, not a cross-vendor one, but it means real Opus 4.8 bills for the same English or code run higher than the equal-token row suggests.

Apply that 30% to the agentic task and Opus 4.8 moves from $540 to $702 per 1,000 tasks, which drops GLM 5.2 to 20% of Opus rather than 25%. We flag this as a sensitivity, not a verdict: GLM 5.2 and GPT-5.5 tokenize the same text differently too, and the only exact comparison is billing your real task on each model and reading the three invoices. The direction is not in doubt — cross-tokenizer effects move the frontier bill up, not down.

When the expensive model still wins

GLM 5.2 being 75-85% cheaper does not make it the right call for everything. Cheaper is only cheaper if it clears your quality bar on the first try; a re-run or a wrong answer erases the discount fast. Pay frontier prices when:

The honest routing rule is the same one we keep landing on: send the easy majority of tasks to the cheap model and reserve the frontier model for the hard, high-stakes minority. That is where model routing earns its keep, and it beats picking one model for the whole workload.

The caveat before you re-route everything

The per-token discount is real and live-verified, but the sticker hides concurrency, latency, and provider-choice tradeoffs that decide your actual bill. GLM 5.2 is served both first-party by z.ai and across roughly 25 third-party providers at a different price and throughput, and self-hosting the open weights only pays off past a tokens-per-day threshold most teams never reach. We priced all of that in the companion piece: the open-weights discount's fine print. For the wider field, the July 2026 cost-per-task breakdown tables 14 models, and the coding-agent cost model shows why input-heavy loops behave the way the agentic row here does.

FAQ

Is GLM 5.2 really a fifth of the price of Claude Opus 4.8 and GPT-5.5? Per output token, yes: $4.40/1M against $25.00 (Opus) and $30.00 (GPT-5.5), which is 15-18%. Per task it lands at 17-25% of the frontier bill depending on how input-heavy the job is, prices verified 2026-07-15.

Why does the discount shrink on agentic workloads? Agentic loops re-send a large input prefix every call, and GLM 5.2's input price ($1.40) is 28% of frontier input ($5.00), a shallower discount than its output price. Input-heavy work is weighted toward the token where GLM saves least.

Does Opus 4.8's tokenizer change the comparison? It widens it. Anthropic's docs state the newer tokenizer emits ~30% more tokens for the same text, so real Opus bills run above the equal-token figure. Applied to the agentic task, Opus moves from $540 to $702 per 1,000 tasks.

When should I still pay for a frontier model? On the hardest reasoning tasks, when you need a mature first-party SLA, when compliance pins your provider, or where a wrong answer costs more than the token saving. Route the hard minority to frontier and keep the bulk on GLM 5.2.

Where do these prices come from? GLM 5.2 from z.ai's live pricing page; Opus 4.8 and GPT-5.5 from our price snapshot, all re-verified 2026-07-15. Every figure is reproducible from the cost script accompanying this post.

Sources

Prices change. We re-verify every figure in this post monthly and stamp updates. Numbers are current as of 2026-07-15.

Want cost-per-task on your own workload across GLM 5.2, Opus 4.8, and GPT-5.5? Vynaris is an OpenAI-compatible gateway that routes each request to the cheapest right-sized model and shows the per-request cost. One base URL swap. Get an API key at vynaris.com.