GLM5.1
GLM5.1 (also written GLM-5.1) is Z.ai's open-weight model for long-running coding agents. Use it in glm5.app Chat or through the API with a paid account, or download the MIT weights and serve the model yourself.
GLM5.1 chat workspace
Quick facts
GLM5.1 at a Glance
The numbers that decide how you run the model. Upstream figures come from the Z.ai guide and the Hugging Face model card, last checked December 5, 2026.
Upstream model
Open weights
- License
- MIT
- Size
- ~754B parameters
- Context
- 200K tokens
- Modalities
- Text in, text out
- Released
- April 7, 2026
Commercial use, modification and redistribution allowed
Mixture of experts: 256 routed experts plus 1 shared, 8 active per token
Up to 128K output tokens
No image input
Z.ai release notes
On glm5.app
Chat and API
- Chat
- GLM 5.1 in the model picker
- API model ID
- glm-5.1
- API price
- ~334 / 1,334 credits
- Long prompts
- ~445 / 1,556 credits
- Thinking
- Deep Think on or off
Paid accounts; free accounts see it locked
Tool calls supported
Per 1M input / output tokens
Whole request, from 32,000 input tokens
Off really skips the reasoning pass
Where Can I Use GLM5.1?
Three ways: glm5.app Chat, the glm5.app API, or the open weights on your own hardware.
In glm5.app Chat
Choose GLM 5.1 in the Chat model picker and send a text prompt. It is a paid model here: free accounts see it locked, and welcome credits do not unlock it. Chat bills credits by tokens used, at least 1 credit per reply.
Through the glm5.app API
Send model glm-5.1 to the OpenAI-compatible Chat Completions endpoint. The API is open to accounts that have bought credits; welcome credits work only in web Chat.
On your own servers
Download the MIT-licensed weights from Hugging Face and serve them with SGLang, vLLM, xLLM, Transformers or KTransformers. Plan for server-class memory.
Run locally
How Much Hardware Does GLM5.1 Need Locally?
Server-class memory: about 1.5 TB for the BF16 weights alone, and several hundred GB even at 4-bit. A single consumer GPU cannot hold it.
| Precision | Weights | What that means |
|---|---|---|
| BF16 (as published) | ~1.5 TB | Multi-GPU cluster |
| 8-bit | ~0.75 TB | Multi-GPU server |
| 4-bit | ~0.38 TB and up | Multi-GPU server, or CPU offload with very large RAM |
Our estimate from the published size of about 754B parameters (bytes per parameter × parameter count). Add memory for the KV cache, which grows with context length, and for runtime overhead. Lower-bit quants trade accuracy for size.
Supported serving frameworks
- SGLang v0.5.10 or later
- vLLM v0.19.0 or later
- xLLM v0.8.0 or later
- Hugging Face Transformers
- KTransformers v0.5.3 or later
vllm serve zai-org/GLM-5.1-FP8 \
--tensor-parallel-size 8 \
--speculative-config.method mtp \
--speculative-config.num_speculative_tokens 3 \
--tool-call-parser glm47 \
--reasoning-parser glm45 \
--enable-auto-tool-choice \
--chat-template-content-format=string \
--served-model-name glm-5.1-fp8Serve the FP8 weights with vLLM
Z.ai also publishes an FP8 checkpoint, zai-org/GLM-5.1-FP8. The vLLM recipe serves it on one node with 8 H200 GPUs (141 GB each) and exposes an OpenAI-compatible API on port 8000.
- Use vLLM 0.19.0, the stable release the recipe recommends, with transformers 5.4.0 or later.
- Thinking is on by default. Send "chat_template_kwargs": {"enable_thinking": false} to turn it off for a request.
- SGLang has its own launch commands per GPU type in the SGLang cookbook.
Coding agents
Is GLM5.1 Good for Coding Agents?
Yes. Z.ai built it for long agentic coding runs and tuned it for agents such as Claude Code and OpenClaw. Its published scores beat GLM-5 on every coding and agent benchmark below.
SWE-Bench Pro
GLM5.1 58.4GLM-5 55.1Terminal-Bench 2.0 (Terminus-2)
GLM5.1 63.5GLM-5 56.2NL2Repo
GLM5.1 42.7GLM-5 35.9CyberGym
GLM5.1 68.7GLM-5 48.3BrowseComp
GLM5.1 68.0GLM-5 62.0MCP-Atlas (public set)
GLM5.1 71.8GLM-5 69.2
Z.ai's self-reported scores from the model card, higher is better. Test on your own repository before you rely on them.
Keep a long agent run under control
- Z.ai says the model can work on one task for up to 8 hours, so set a token or turn budget before you start.
- Validate tool-call arguments before your agent executes them, so a bad call cannot loop.
- Keep tests in the loop and have the agent run them after each change instead of trusting its summary.
- Split the work: hand over the routine steps and review risky changes yourself.
Connect a coding client to the glm5.app API
OpenCode, Codex and Cursor can use the glm5.app API directly: follow the client guide and set the model to glm-5.1. Claude Code speaks Anthropic's protocol, so it needs a translating gateway in between.
Practical answers
Using GLM5.1 Day to Day
Short answers to the questions people ask once the model is running.
How do I turn GLM5.1 thinking off?
Switch Deep Think off in glm5.app Chat. For this model the switch really disables the reasoning pass, which gives faster, shorter replies for simple tasks. Turn it back on for debugging and planning.
Why does GLM5.1 feel different across providers?
The weights are open, so every host chooses its own precision, quantization and settings. A heavily quantized copy can answer worse than the BF16 original. Compare hosts on the same prompt before you judge the model.
Can GLM5.1 see images?
No. It takes text and returns text. On glm5.app, web search is also switched off for this model; to work with an image, pick a model that accepts image input.
What if GLM5.1 is unavailable?
Chat can answer that turn with GLM 5.3 Flash or DeepSeek V4 Flash instead, so the request does not simply fail.
Choosing a version
Should I Use GLM5.1 or a Newer GLM?
Stay on 5.1 when you need MIT weights you can host yourself or a workflow already tuned for it. For hosted work, run the same task on a newer GLM and keep whichever answers better.
API
How Do I Call the GLM5.1 API?
Send model glm-5.1 to https://glm5.app/api/v1/chat/completions with your API key. The request format is OpenAI-compatible.
curl https://glm5.app/api/v1/chat/completions \
-H "Authorization: Bearer $GLM5_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.1",
"messages": [
{"role": "user", "content": "Find the bug in this function and propose a minimal patch."}
]
}'- Price: about 334 credits per 1M input tokens and 1,334 per 1M output tokens.
- From 32,000 input tokens the whole request is billed at about 445 / 1,556 credits per 1M, input and output alike.
- Each request costs at least 1 credit, rounded up.
- Needs an account that has bought credits. Keep the API key on your server.
GLM5.1 FAQ
Direct answers about the model on glm5.app and in your own stack.
Is GLM5.1 the same as GLM-5.1 and GLM 5.1?
Yes. They are three spellings of the same Z.ai model; the API ID is glm-5.1. Our GLM 5.1 specifications page covers the full spec sheet and release history.
Is GLM5.1 free?
The weights are free to download under the MIT license. On glm5.app it is a paid model: Chat needs a paid account and the API needs bought credits.
Can I use GLM5.1 commercially?
Yes. The MIT license allows commercial use, modification and redistribution of the weights.
What is the GLM5.1 context window?
Up to 200K tokens of context, with up to 128K output tokens, according to the Z.ai guide.
Can I run GLM5.1 on one GPU?
No. Even a 4-bit copy needs several hundred GB of memory. Use a multi-GPU server, a machine with very large RAM and CPU offload, or the hosted model in Chat or the API.
Does GLM5.1 support tool calls?
Yes. It supports function calling, structured output and streaming, and the glm5.app API accepts tools with this model.
Start here
Try GLM5.1 on Your Own Task
Open Chat, pick GLM 5.1 and give it a real coding or writing task.
