Skip to content
OpenKey

Claude Sonnet 5 vs GLM 5

AnthropicZ.aiboth via one key, provider price + 3%

Claude Sonnet 5 (Anthropic, released 2026-06-30) and GLM 5 (Z.ai, released 2026-02-11) sit at opposite ends of the price-performance curve. Sonnet 5 charges more and supports images, files, and a 1M-token context window with selectable reasoning effort. GLM 5 is text-only, open-source, and priced to run agent workflows at volume. Both are available on OpenKey with a flat 3% fee on provider list price, so the comparison below uses real per-token costs.

Spec vs spec

SpecClaude Sonnet 5GLM 5
Context window1M203K
Max output128K
Input modalitiestext, image, filetext
Output modalitiestexttext
ReleasedJun 30, 2026Feb 11, 2026
Reasoningoptionaloptional

Pricing

Per 1M tokens. Provider price plus the flat 3% fee — the sum is what you pay.

openkey.ai

anthropic/claude-sonnet-5

Input · 1M tokens

$2.00 + 3%$2.06

Output · 1M tokens

$10.00 + 3%$10.30

Cache read · 1M tokens

$0.200 + 3%$0.206

Cache write · 1M tokens

$2.50 + 3%$2.58

FEE — FLAT, EVERY MODEL3%

openkey.ai

z-ai/glm-5

Input · 1M tokens

$0.600 + 3%$0.618

Output · 1M tokens

$1.92 + 3%$1.98

Cache read · 1M tokens

$0.120 + 3%$0.124

FEE — FLAT, EVERY MODEL3%

One workload, priced on both

10M input + 2M output tokens at each model's price, flat 3% fee included.

anthropic/claude-sonnet-5

$41.20

$40.00 provider + 3%

z-ai/glm-5Cheaper

$10.14

$9.84 provider + 3%

Pricing math

On OpenKey, Claude Sonnet 5 costs $2.06/M input and $10.30/M output (provider price $2.00/$10.00 x 1.03). GLM 5 costs $0.618/M input and $1.9776/M output (provider price $0.60/$1.92 x 1.03). Run the numbers on a 10M-input, 2M-output workload: Claude Sonnet 5 comes to $40.00, GLM 5 comes to $9.84. That's a 3.33x input price ratio in GLM 5's favor. If you're running agent loops or batch jobs where token volume is the dominant cost driver, GLM 5's price advantage compounds fast — four workloads on GLM 5 cost less than one on Sonnet 5.

Coding and agentic performance

Claude Sonnet 5 posts an Artificial Analysis coding index of 71.5 and an agentic index of 46.7, with an overall intelligence index of 53.4 — Anthropic markets it explicitly for frontier coding and agent work with adjustable reasoning effort (low through max). GLM 5 doesn't have Artificial Analysis scores in this dataset, but it has Design Arena results across 12 categories: it ranks #3 in Godot game dev (1237 elo, 54.8% win rate) and #6 in Android native agents (1244 elo, 62% win rate), with most other categories landing in the 13-26 rank range. Sonnet 5's benchmark suite is more clearly frontier-tier; GLM 5's strength is concentrated in specific agent and game-dev categories.

Context and modality

Claude Sonnet 5 supports a 1,000,000-token context window against GLM 5's 202,752 tokens — a 4.93x ratio. That gap matters for large codebases, long document analysis, or multi-file refactors where you don't want to chunk input. Modality is the other split: Sonnet 5 accepts text, image, and file input (text-only output), while GLM 5 is text-to-text only. If your workload touches screenshots, PDFs, or scanned documents, GLM 5 is not an option regardless of price.

When to pick each

Pick Claude Sonnet 5 when you need multimodal input, a 1M-token context window, adjustable reasoning depth (Sonnet 5 supports low/medium/high/max/xhigh effort levels), or top-tier coding accuracy and the budget supports it. Pick GLM 5 when the job is text-only, high-volume, or long-horizon agent work where its Design Arena rankings (top-15 in most categories, top-3 in Godot game dev) are good enough and the 3.33x cost gap on input tokens changes your unit economics.

Which model for which job

Use casePickWhy
Large codebase refactor (500K+ tokens of context)Claude Sonnet 51M-token context window vs. GLM 5's 202,752 — nearly 5x more room
High-volume agent pipeline, cost-sensitiveGLM 5$9.84 vs. $40.00 for a 10M-in/2M-out workload
Document or screenshot analysisClaude Sonnet 5Supports image and file input; GLM 5 is text-only
Godot game development agent tasksGLM 5Ranks #3 in Design Arena's Godot game dev category, 1237 elo
Frontier coding accuracy on hard problemsClaude Sonnet 571.5 Artificial Analysis coding index
Android native agent workflowsGLM 562% win rate, rank #6 in Design Arena's Android native category

Questions

How much cheaper is GLM 5 than Claude Sonnet 5?
On a 10M-input/2M-output workload, GLM 5 costs $9.84 on OpenKey versus $40.00 for Claude Sonnet 5 — roughly a 3.33x gap on input pricing ($0.618/M vs. $2.06/M). For high-volume or agentic pipelines, that difference adds up fast.
Which model has a bigger context window?
Claude Sonnet 5 supports 1,000,000 tokens of context versus GLM 5's 202,752 — a 4.93x ratio. If you're feeding in large codebases or long documents without chunking, Sonnet 5 has the room; GLM 5 doesn't.
Can GLM 5 handle images or files?
No. GLM 5 is text-to-text only. Claude Sonnet 5 accepts text, image, and file inputs (output stays text-only), so any workload involving screenshots or PDFs needs Sonnet 5 or another multimodal model.
Which model scores better on coding benchmarks?
Claude Sonnet 5 has an Artificial Analysis coding index of 71.5 and an agentic index of 46.7. GLM 5 doesn't have comparable Artificial Analysis scores in this dataset, but it ranks in the top 15 across most Design Arena categories, including #3 in Godot game dev.

Go deeper