Claude Sonnet 5 vs GLM 5.2

API pricing, context window and capabilities for Claude Sonnet 5 and GLM 5.2, side by side. Prices are the cheapest serving route per 1M tokens, verified against LiteLLM and OpenRouter.

Verdict

computed from the published numbers

Claude Sonnet 5 wins on coding, on intelligence and on context window. GLM 5.2 wins on price.

Price
GLM 5.2
Coding
Claude Sonnet 5
Intelligence
Claude Sonnet 5
Context window
Claude Sonnet 5

Key takeaways

who wins on what, from the published numbers

Claude Sonnet 5 wins

  • Larger context window (1M vs 262K)
  • More serving providers (4 vs 1)
  • Supports vision
  • Supports prompt caching
  • Supports structured output

GLM 5.2 wins

  • Cheaper input ($2.00 vs $1.40 /1M)
  • Cheaper output ($10.00 vs $4.40 /1M)
  • Higher max output (128K vs 262K)
Cheaper overall
GLM 5.2
$1.40 + $4.40 /1M
Larger context
Claude Sonnet 5
1M
More providers
Claude Sonnet 5
4 providers

Pricing & specs

cheapest serving route · per 1M tokens
Claude Sonnet 5GLM 5.2
Input $/1M$2.00 $1.40 best
Output $/1M$10.00 $4.40 best
Context window1M best262K
Max output128K 262K best
Serving providers4 best1
Released2026-06-30 2026-06-13

Benchmarks

Artificial Analysis indices, side by side
Claude Sonnet 5GLM 5.2
Intelligence53.4 best51.1
Coding71.5 best68.8
GPQA Diamond91% best89%
Output speed67 t/s 200 t/s best
Latency (TTFT)42.19s 6.32s best

Cost calculator

choose a serving route for each side
Input tokens / month
Output tokens / month
Claude Sonnet 5
via Amazon Bedrock
$20
GLM 5.2
via Cloudflare
$11

Capabilities

feature support, side by side
FeatureClaude Sonnet 5GLM 5.2
Vision
Tool use
Reasoning
Audio
Prompt caching
Structured output
Web search

Related comparisons

Frequently asked questions

Which is cheaper, Claude Sonnet 5 or GLM 5.2?
GLM 5.2 is cheaper for input ($2.00 vs $1.40 per 1M tokens). GLM 5.2 is cheaper for output ($10.00 vs $4.40 per 1M tokens).
What is the context window difference between Claude Sonnet 5 and GLM 5.2?
Claude Sonnet 5 has a 1M-token context window and GLM 5.2 has 262K tokens, so Claude Sonnet 5 can take a larger prompt.
How do Claude Sonnet 5 and GLM 5.2 compare on benchmarks?
On the tracked Artificial Analysis indices, Claude Sonnet 5 leads on coding, and Claude Sonnet 5 leads on intelligence.
Pricing verified against LiteLLM + OpenRouter + provider pages · refreshed daily

Every weekday

AI moves fast. Here's your debrief.

News, analysis, tools, and more.

For people who build with AI