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

Z.ai · Model guide

GLM-5.1

Compare
z-ai/glm-5.1

Z.AI's open flagship, 754B parameters, tuned for engineering tasks that run unattended for hours — plan, execute, debug, finish. 200K context, and a high-speed variant for latency-sensitive use.

Modalities
TextText
Context
200K
Max output
128K
Price / 1M tokens
$ 1.00in$ 3.80out
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.

VendorA flagship foundation model for long-horizon Agentic Engineering.source

Best for
  • Long-horizon engineering · Targets planning, execution, debugging and delivery over long-running tasks.(vendor claim)source

  • Performance engineering · Official examples emphasize iterative database and CUDA optimization.(vendor claim)source

Neighbouring models
  • z-ai/glm-5.2successor —5.2 supersedes 5.1 on the same agentic coding workloads.
  • z-ai/glm-5-turbofaster —Turbo trades ceiling for latency on interactive edits.
Compare them side by side →

Pricing and billing

Tiered pricing: the rate changes once the input passes the threshold.

Price / 1M tokens by input sizeInput < 32.0KInput ≥ 32.0K
Input$ 1.00$ 1.20
Output$ 3.80$ 4.40
Cache read$ 0.20$ 0.30
Cache write$ 1.00$ 1.20
Estimate a request

At this input size you are on the Input < 32.0K tier.

$ 0.0176
Estimated cost per request
10.0K × $ 1.00
+ 2.0K × $ 3.80
≈ $ 17.60 per 1,000 requests

Capabilities and limits

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

Context window
200.0K 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:Specsdocs.z.ai 1huggingface.co 2Capabilitiesdocs.z.ai

Published benchmarks

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

Coding
  • SWE-Bench Pro
    resolved_rate·Z.AI · 2026-04-07setup not fully disclosed
    58.4%
Performance engineering
  • KernelBench Level 3 Optimization
    geometric_mean_speedup·Z.AI · 2026-04-07setup not fully disclosed

    Speedup comes from a tool-driven optimization loop, not a single-pass generation.

    3.6×

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.1?
GLM-5.1 is available on CrossModel as z-ai/glm-5.1. It has a 200K-token context window and can return up to 128K tokens per request.
How much does GLM-5.1 cost?
Currently $ 1.00 per 1M input tokens and $ 3.80 per 1M output tokens. Cached input is billed at $ 0.20 per 1M.
Does GLM-5.1 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.