Skip to content

Models / Z.ai (Zhipu)

GLM-5.1

Available

GLM-5.1 is a Z.ai flagship text model released on 2026-04-07.

Good for Coding agents · Hard reasoning

Is it right for you?

Z.ai built it for long tasks and says it can work on one task for up to 8 hours. It is two versions before our current GLM-5.3 and one before GLM-5.2. Z.ai lists a 200K context window for it, much smaller than the 1M it lists for GLM-5.2. It takes text only. Pick it only if your workflow is already tuned for it.

Best for

  • Agentic coding where you already tested GLM-5.1 and want stable results.
  • Front-end work, prototypes and office documents, which Z.ai lists as use cases.
  • Long autonomous runs on one task.

Not ideal for

  • Very large prompts: Z.ai lists 200K context, below GLM-5.2.
  • Images and video: GLM-5.1 takes text only.
  • New projects: GLM-5.3 is the newer flagship.

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

ModelInputOutputContextPer session
GLM-5.1 (this page)$0.6438$2.575331K$0.2215
GLM-5.2$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
$250.32

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

Per request
$0.004172
Coding session
$0.22
Per day
$8.34
Suggested key budget
$290.00
Alert at 80%
$232.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.1 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 effortNot 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.1

Full steps for each tool: integration guides →

Questions

What is GLM-5.1?

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

Does GLM-5.1 support tool calling?

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

Does GLM-5.1 support reasoning?

Yes. Z.ai turns thinking on by default and lets you turn it off. Z.ai does not list effort levels for this model.

Should I use GLM-5.1 or GLM-5.3?

Use GLM-5.3 for new work. It is two releases newer. GLM-5.1 has a smaller listed context window (200K) and Z.ai lists no effort levels for it. Pick GLM-5.1 only if your prompts and tests are built on it. You can also list GLM-5.3 first and GLM-5.1 as a fallback with models (OpenAI format) or fallbacks (Anthropic format).