GLM-5.2
z-ai/glm-5.2
Back to model catalog

Z.ai · Model guide

GLM-5.2

Compare
z-ai/glm-5.2

Z.AI's million-token open flagship for long-horizon software engineering and tool-driven agents. Its IndexShare architecture is designed to keep retrieval and reasoning efficient as context grows.

Modalities
TextText
Context
1M
Max output
128K
Price / 1M tokens
$ 1.20in$ 4.40out
StreamingTool callingJSON outputImage inputThinking mode · can be turned off

What this model is good at

What the vendor positions it for, and which of our models to reach for instead.

VendorAn open foundation model for context-heavy agentic coding and research.source

Best for
  • Million-token workflows · A 1M-token context supports repository-scale and document-heavy tasks.(vendor claim)source

  • Agentic software engineering · Strong official results span repository repair, terminals and MCP tool use.source

Neighbouring models
  • z-ai/glm-5.1predecessor —Use GLM-5.1 when the established 200K-context deployment is sufficient.
Compare them side by side →

Pricing and billing

Billed per token. Cached input is charged at the cache-read rate.

Price / 1M tokensYou pay
Input$ 1.20
Output$ 4.40
Cache read$ 0.30
Cache write$ 1.20
Estimate a request
$ 0.0208
Estimated cost per request
10.0K × $ 1.20
+ 2.0K × $ 4.40
≈ $ 20.80 per 1,000 requests

Capabilities and limits

What CrossModel guarantees across every route this model can take right now.

Context window
1.0M tokens
Max output
128.0K tokens
Input / output modalities
Text → Text
Streaming
Supported
Tool calling
Supported
Structured output (JSON)
Supported
Image input
Not supported
Thinking mode
Supported· can be turned off
Available endpoints
/v1/chat/completions · /v1/responses · /v1/messages
First-party sources:Specshuggingface.co 1z.ai 2Capabilitieshuggingface.co 1docs.z.ai 2

Published benchmarks

Scores the vendor reported, with the evaluation setup each one came from.

Agentic coding
  • Terminal-Bench 2.1
    pass_rate·Z.AI · 2026-06-17Terminus-2
    81%
Coding
  • SWE-Bench Pro
    resolved_rate·Z.AI · 2026-06-17setup not fully disclosed
    62.1%
Reasoning
  • GPQA Diamond
    accuracy·Z.AI · 2026-06-17setup not fully disclosed
    91.2%
  • Humanity's Last Exam
    accuracy·Z.AI · 2026-06-17
    40.5%
  • Humanity's Last Exam (with tools)
    accuracy·Z.AI · 2026-06-17
    54.7%
Tool use
  • MCP Atlas Public
    score·Z.AI · 2026-06-17setup not fully disclosed
    76.8%
  • Tool Decathlon
    score·Z.AI · 2026-06-17setup not fully disclosed
    48.2%

Vendor-reported numbers, not CrossModel measurements. Scores are only comparable when the benchmark version, metric and evaluation setup match, so nothing here is averaged or ranked.

Use it in your tools

Point the base URL at CrossModel and paste this model ID — every tool below has a setup guide.

See all integration guides →

Frequently asked questions

What is GLM-5.2?
GLM-5.2 is available on CrossModel as z-ai/glm-5.2. It has a 1M-token context window and can return up to 128K tokens per request.
How much does GLM-5.2 cost?
Currently $ 1.20 per 1M input tokens and $ 4.40 per 1M output tokens. Cached input is billed at $ 0.30 per 1M.
Does GLM-5.2 support tool calling and structured output?
Tool calling: Supported · Structured output (JSON): Supported · Image input: Not supported · Streaming: Supported · Thinking mode: Supported
Which endpoint do I call?
For text models, OpenAI Chat Completions (/v1/chat/completions), OpenAI Responses (/v1/responses) and Anthropic Messages (/v1/messages) all work — pick whichever your SDK already speaks.
Can I try it without writing code?
Yes. Sign in and open the Playground on this page to chat with the model directly — no API key needed. Usage is billed from your wallet at the normal rate.

Chat first, integrate later

Chat first, then wire it in once you like the answers.