Skip to content

Models / Z.ai (Zhipu)

GLM-5.2

Available

GLM-5.2 is a Z.ai flagship text model released on 2026-06-16, one version before our current GLM-5.3.

Good for Coding agents · Hard reasoning · Long context

Is it right for you?

Z.ai built it for long, multi-step agent and coding work and lists a 1M-token context window. Compared with GLM-5.3, it is the older release. Z.ai’s docs let you switch thinking on or off, while our GLM-5.3 page says that model always reasons. It takes text only. Pick it if you tested your workflow on it and do not want to move to GLM-5.3 yet.

Best for

  • Coding agents on long tasks: project-wide analysis, multi-step refactors, long debugging sessions.
  • Work that needs a very large prompt, if our context limit allows it.
  • Teams that already tuned prompts on GLM-5.2 and want to keep the same behaviour.

Not ideal for

  • Images and video: GLM-5.2 takes text only.
  • New projects: GLM-5.3 is the newer flagship.
  • Prompts longer than 128K tokens, the limit in our catalogue today.

Next to the rest of the Z.ai (Zhipu) line

ModelInputOutputContextPer session
GLM-5.1$0.6438$2.575331K$0.2215
GLM-5.2 (this page)$0.8584$3.0045128K$0.2962
GLM-5.3$1.3949$4.8823128K$0.4813
GLM-5.3 FlashPrice coming soonNot listedNot priced yet

* The maker's listed context. Ours is confirmed with our price, and may be lower. Prices and session cost show once our price is set.

What it costs

Prepaid, per token, no subscription. Set your traffic to see your bill.

percent of input tokens
Estimated monthly spend
$337.36

30 days, at today's prices. You're billed on actual tokens.

Per request
$0.005623
Coding session
$0.30
Per day
$11.25
Suggested key budget
$390.00
Alert at 80%
$312.00

A coding session is 30 requests of 20,000 input tokens, 80% from cache, and 1,000 output tokens each: the same session as the "Per session" column above. Thinking tokens are billed as output, so reasoning raises the cost.

One price all day: this model has no peak pricing in our catalogue.

Capabilities

What GLM-5.2 can do, as Z.ai lists it.

CapabilitySupport
Tool callingYes, function calling and MCP listed
Parallel tool callsNot listed
ReasoningOptional: on by default, can be disabled
Reasoning effortZ.ai’s examples use max; other levels not listed
Image inputNo: text in, text out
JSON outputStructured output listed
StreamingYes
Prompt cachingContext caching listed

Get started

Create a key in the console, export it as YUNSHU_API_KEY, then use one of these.

export ANTHROPIC_BASE_URL=https://api.yunshurouter.com
export ANTHROPIC_AUTH_TOKEN=$YUNSHU_API_KEY
export ANTHROPIC_MODEL=glm-5.2

Full steps for each tool: integration guides →

Questions

What is GLM-5.2?

GLM-5.2 is a text model from Z.ai (Zhipu AI), released on 2026-06-16. It is made for long agent and coding tasks.

Does GLM-5.2 support tool calling?

Yes. Tool calling works in both the OpenAI format (tools) and the Anthropic format (tools with input_schema).

Does GLM-5.2 support reasoning?

Yes. Z.ai turns thinking on by default and lets you turn it off.

Should I use GLM-5.2 or GLM-5.3?

Use GLM-5.3 for new work, because it is the newer flagship. Z.ai’s docs show GLM-5.2 with a thinking on/off switch, and our GLM-5.3 page says that model always reasons, so GLM-5.2 can give shorter answers when you turn thinking off. Pick GLM-5.2 if your prompts are tuned for it. You can also list GLM-5.3 first and GLM-5.2 as a fallback with models (OpenAI format) or fallbacks (Anthropic format).