GLM 5.2

z-ai/glm-5.2
Featured
ToolsJSONReasoning
by Z.ai · 2026-06-16

GLM-5.2 is Z.ai (Zhipu AI)'s flagship model for the era of long-horizon tasks. It pairs a truly usable 1M-token context window with up to 128K output tokens, letting it hold project-level engineering context, execute long-running tasks more reliably, follow engineering standards more consistently, and carry a task from requirements through to multi-platform deployment in a single run. It is a text-in / text-out model with hybrid reasoning controlled by reasoning_effort (high / max; deep reasoning by default) and native tool calling. Built coding-first as the latest in the GLM-5 line, GLM-5.2 launched on the GLM Coding Plan with standalone API access and MIT-licensed open weights following shortly after. It targets repo-scale agentic coding, autonomous multi-step engineering workflows, and complex long-horizon delivery.

ctx1M tokens
Max output128K
Inputtext
Outputtext
p50 TTFT4.92 s
INPUT$1.40/ 1M tokens
OUTPUT$4.40/ 1M tokens
p50 TTFT4.92 s7d
p95 TTFT10.00 s7d
TRAFFIC364.2Mtokens / 7d

Z.ai: GLM 5.2 is a text‑only large language model with a 1,000,000‑token context window and a maximum output of 128,000 tokens. It is developed by Z.ai and offered through OrcaRouter’s API. The model…

What is Z.ai: GLM 5.2?

Who is this model designed for?

What are the key specifications?

Code samples

Call from any SDK

OpenAI-compatible — keep the SDK you already use

  • OpenAI SDKhttps://api.orcarouter.ai/v1
from openai import OpenAI

client = OpenAI(
    base_url="https://api.orcarouter.ai/v1",
    api_key="$ORCAROUTER_API_KEY",
)

response = client.chat.completions.create(
    model="z-ai/glm-5.2",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Supported parameters

  • include_reasoning
  • max_tokens
  • reasoning
  • reasoning_effort
  • response_format
  • stop
  • stream
  • temperature
  • tool_choice
  • tools
  • top_p

Pricing

Input / 1M tokens$1.40
Output / 1M tokens$4.40
Cache read / 1M$0.260
CurrencyUSD

Cost calculator

Tokens / month10MM
Input share70%%
Estimated / month $23.00 · With prompt caching $19.01

Estimate based on list price

Token & cost estimator

Input tokens: 20Cost per request: $0.002228

Estimate only — actual token counts depend on the provider's tokenizer.

Performance

p50 TTFT
4.92 s
Output speed
65.3 tok/s
p95 TTFT
10.00 s
Error rate
0.06%

Public benchmarks

56.8
AA Coding
Better than 82% of models compared
#19 of 106
60.8
AA Intelligence
Better than 87% of models compared
#14 of 110
59.8
AA Math
Better than 43% of models compared
#46 of 81
AIME 2026
99.2
CritPt
16.7
DeepSWE
46.2
FrontierSWE (Dominance)
74.4
GPQA Diamond
52.8 index
GPQA-Diamond
91.2
HLE
40.5
HLE (w/ Tools)
54.7
HMMT Feb. 2026
92.5
HMMT Nov. 2025
94.4
IMOAnswerBench
91.0
MCP-Atlas (Public Set)
76.8
MMLU-Pro
62.8 index
NL2Repo
48.9
PostTrainBench
34.3
ProgramBench
63.7
SWE-bench Pro
62.1
SWE-Marathon
13.0
Terminal Bench 2.1 (Best Reported)
82.7
Terminal Bench 2.1 (Terminus-2)
81.0
Tool-Decathlon
48.2
τ²-Bench
47.8 index
Source: artificialanalysis.ai, zai-org

How it compares

GLM 5.2GLM 5.1GLM 5GLM 4.5
Input $/M$1.40$1.40$1.00$0.60
Output $/M$4.40$4.40$3.20$2.20
Context1.0M200K200K128K
Quality9/109/108/107/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

What is the cost per token for GLM 5.2?
Input tokens cost $1.40 per million tokens, and output tokens cost $4.40 per million tokens. There is no markup by OrcaRouter; you pay Z.ai’s provider rate.
What is the model’s context window size?
The context window is 1,000,000 tokens (combined input and output). The maximum output is 128,000 tokens per request.
What are the model’s strengths?
Its main strength is the large context window (1M tokens) and high output limit (128k tokens), enabling processing of very long documents or conversations in a single call. It is text‑only.
How does GLM 5.2 compare to other models with smaller context windows?
It has a much larger context window, making it suitable for tasks that require reading entire books or large codebases. Smaller models are cheaper and faster for tasks that fit within their context limits.
Does OrcaRouter cache tokens or offer discounts?
No, OrcaRouter does not advertise token caching or volume discounts for this model. Pricing is per‑token at the provider’s rate with zero markup.
How do I call GLM 5.2 through OrcaRouter?
Use the OpenAI‑compatible API at base URL https://api.orcarouter.ai/v1, model ID “z-ai/glm-5.2”. Send a standard chat completion request with your API key.
What input modalities does the model support?
Z.ai: GLM 5.2 supports only text input. It cannot process images, audio, or other multimodalities.
Are there any known benchmark scores?
No benchmark scores for GLM 5.2 are provided in the available facts. Users should evaluate the model on their own datasets.
Can I stream the output?
Yes, set `stream: true` in your API call. The response will be sent as server‑sent events, identical to OpenAI’s streaming format.
What happens if I exceed the 1M token limit?
You will receive an error. Ensure the total number of tokens in your messages plus max_tokens does not exceed 1,000,000.

Embed this badge

Z.ai: GLM 5.2$1.40/M in4922ms p50via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/z-ai/glm-5.2" target="_blank"> <img src="https://www.orcarouter.ai/embed/z-ai/glm-5.2.svg" alt="Z.ai: GLM 5.2 on OrcaRouter" /> </a>
Markdown [![Z.ai: GLM 5.2](https://www.orcarouter.ai/embed/z-ai/glm-5.2.svg)](https://www.orcarouter.ai/models/z-ai/glm-5.2)

Model card as data

GET /api/public/models/z-ai/glm-5.2Open
Machine-readable:/llms.txt/llms-full.txt