What is GLM-5.1?
GLM-5.1 is Z.ai's mixture-of-experts model with 744B parameters, 40B of them active per token, released as open weights under the MIT license. It reads and writes text only, with a 200K-token context and up to 128K tokens of output. Z.ai trained it to keep working on one goal for hours, running experiments, reading results and changing course, and says it held up for 8 hours building a browser-based Linux desktop.
Two newer models have followed at the same API price, GLM-5.2 and GLM-5.3, both with a 1M-token context. The GLM Coding Plan now sends GLM-5.1 requests to GLM-5.3, and Z.ai's public chat picker no longer lists it.
Is GLM-5.1 still available?
Yes on Z.ai's API and as open weights, but Z.ai's own chat app and Coding Plan now use newer models.
- Z.ai API
- Still listed at $1.4 / $4.4 per million tokens under the model ID glm-5.1.
- GLM Coding Plan
- Requests for GLM-5.1 now run on GLM-5.3 instead.
- Z.ai chat
- The public model picker now offers GLM-5.3-Flash, GLM-5.3 and GLM-5.2 instead.
- Open weights
- Still on Hugging Face and ModelScope under the MIT license, in BF16 and FP8.
Who is GLM-5.1 best for?
GLM-5.1 is best for developers building long-running coding agents on an MIT-licensed model they can host themselves or call on Z.ai's API.
Hours-long autonomous tasks
Z.ai built it to work on one task for up to 8 hours, planning, running and refining its own output without a person stepping in.
Optimization loops
In Z.ai's tests it kept improving a vector search engine over 600 iterations and averaged a 3.6x speedup on KernelBench Level 3.
Coding agents on Z.ai's API
It plugs into Claude Code, OpenCode, Kilo Code, Cline and OpenClaw, so an existing agent setup can switch by changing the model name.
Self-hosting
BF16 and FP8 weights are on Hugging Face and ModelScope under the MIT license, with guides for SGLang, vLLM and KTransformers.
What's included with GLM-5.1?
Long-horizon runs of up to 8 hours, thinking mode, tools and MCP, support in the main coding agents, and MIT-licensed weights.
- Long-horizon runs
- Designed to plan, execute, test and fix on a single task for up to 8 hours, over thousands of tool calls.
- Thinking mode
- Reasons before answering, with the thinking switch set per request on Z.ai's API.
- Tools and MCP
- Function calling, MCP servers, JSON structured output, streaming and context caching on the API.
- Works in coding agents
- Z.ai supports it in Claude Code, OpenCode, Kilo Code, Roo Code, Cline and Droid, and it is compatible with OpenClaw.
- Open weights
- MIT-licensed BF16 and FP8 weights that run on SGLang, vLLM, xLLM, Transformers and KTransformers, including on Ascend NPUs.
What changed from GLM-5?
Better long-task coding on the same 744B design, at a higher price per token.
- Coding
- 58.4 on SWE-Bench Pro and 63.5 on Terminal-Bench 2.0 in Z.ai's tests, up from 55.1 and 56.2.
- Repo generation
- 42.7 on NL2Repo, up from 35.9.
- Security
- 68.7 on CyberGym, up from 48.3.
- Long runs
- Z.ai says GLM-5 levels off early on long tasks, while GLM-5.1 kept finding gains over 600 iterations.
- Price
- $1.4 / $4.4 per million tokens, up from $1 / $3.2 for GLM-5.
How much does GLM-5.1 cost?
GLM-5.1 costs $1.4 per million input tokens and $4.4 per million output tokens on Z.ai's API, and its MIT-licensed weights are free to download.
- MIT license on Hugging Face and ModelScope
- 744B parameters with 40B active, in BF16 and FP8
- Runs on SGLang, vLLM, xLLM or KTransformers
- Cached input $0.26 per million tokens
- 200K-token context, up to 128K tokens out
- Text input only
Prices are in US dollars. Z.ai charges the same per token for its newer GLM-5.2 and GLM-5.3, which have a 1M-token context, and $1 / $3.2 for the older GLM-5. The GLM Coding Plan (from $18 a month) sends GLM-5.1 requests to GLM-5.3. Full pricing on docs.z.ai. We checked these prices on .
How do readers rate GLM-5.1?
No one has rated GLM-5.1 yet. Be the first.
Sign in to rate. One rating per account.
GLM-5.1 pros and cons
Users call it strong value near Claude Opus 4.6 on short-context work, but many saw it break down past about 100K tokens on Z.ai's servers, and GLM-5.3 now costs the same.
Pros
- Many users rate it the best value of the coding models they have tried, and several put it on par with Claude Opus 4.6 on real work as long as the context stays short.
- Holds up in long agent runs: OpenClaw and coding-agent users report it made fewer mistakes and worked longer on its own than MiniMax M2.7.
- Leads Z.ai's published table on SWE-Bench Pro (58.4) and CyberGym (68.7), ahead of GPT-5.4 and Claude Opus 4.6.
- Open weights mean other hosts serve it too, which users turned to when Z.ai's own servers struggled.
Cons
- On Z.ai's own service many users saw it turn to gibberish past about 100K tokens, half its 200K window, so they compact or restart sessions early.
- Z.ai's servers were slow or overloaded for many users, with timeouts and rate-limit errors at busy hours.
- At 744B parameters it is out of reach for home hardware; users with high-end local rigs say it is too big to run.
- GLM-5.3 now costs the same $1.4 / $4.4 per million tokens with a 1M-token context, and the Coding Plan no longer serves GLM-5.1.
Is GLM-5.1 open source?
Yes. GLM-5.1's code is public under the MIT licence, so you can run it on your own server.
What are the best GLM-5.1 alternatives?
GLM-5.1 is an open source alternative to MiniMax M2.7. DeepSeek V4.1 Flash does the same job and is open source too.
MiniMax's low-cost open-weight model for coding and tool use.
DeepSeek's small, efficient open model.
Choose it when you want Z.ai's current flagship at the same $1.4 / $4.4 per million tokens, with a 1M-token context instead of 200K; the Coding Plan already sends GLM-5.1 requests to it.
Choose it when cost matters most: at $0.15 / $0.50 per million tokens it is nearly 90% cheaper, with a 1M context and image and video input.
Choose it when you want another open-weight coding model with a larger 262K context, at a slightly lower $0.95 / $4.00 per million tokens.
Questions about GLM-5.1
What is GLM-5.1?
GLM-5.1 is Z.ai's open-weight model for long-running coding agents, built to work on one task for hours; Z.ai still sells it on its API, but GLM-5.3 has replaced it on Z.ai's plans.
Who is GLM-5.1 for?
GLM-5.1 is best for developers building long-running coding agents on an MIT-licensed model they can host themselves or call on Z.ai's API.
Is GLM-5.1 free?
Partly. GLM-5.1's weights are free on Hugging Face and ModelScope under the MIT license, so you can run it on your own hardware at no license cost. Through Z.ai's API it costs $1.4 per million input tokens and $4.4 per million output tokens.
How much does GLM-5.1 cost?
GLM-5.1's paid plans are API at $1.4 / $4.4 per million input / output tokens.
Is GLM-5.1 open source?
Yes. GLM-5.1's code is public under the MIT licence, so you can run it on your own server.
What are the best GLM-5.1 alternatives?
The closest alternatives on Recaply are MiniMax M2.7, DeepSeek V4.1 Flash, GLM-5.3, GLM-5.3-Flash and Kimi K2.7 Code.
Where can I try GLM-5.1?
On its official website, z.ai.
Is GLM-5.1 still worth using over GLM-5.3?
Only if you need GLM-5.1 itself, for example in a setup you have already tested. On Z.ai's API, GLM-5.3 costs the same $1.4 / $4.4 per million tokens with a 1M-token context instead of 200K, and the GLM Coding Plan already sends GLM-5.1 requests to GLM-5.3.
Can I run GLM-5.1 locally?
Only on server-scale hardware. GLM-5.1 has 744B parameters with 40B active per token. Z.ai publishes BF16 and FP8 weights with guides for SGLang, vLLM, xLLM, Transformers and KTransformers, plus Ascend NPU support.
Does Z.ai keep my prompts when I use GLM-5.1 through the API?
No, by its own terms. Z.ai's data processing addendum for API customers says it does not store the text you send or the output you get; requests are processed in real time, generally in Singapore.
Our verdict
GLM-5.1 is a capable open coding model, but on Z.ai's API there is little reason to pick it over GLM-5.3.
GLM-5.3 costs the same per token with five times the context, and many users found GLM-5.1 on Z.ai's servers unreliable past about 100K tokens.
- Skip it for
- New projects on Z.ai's API or Coding Plan; start with GLM-5.3 or GLM-5.3-Flash.
- Check first
- If you self-host or use another provider, test long sessions yourself before trusting it with multi-hour runs.







