Z.ai
GLM-5.4
how Z.ai’s coding model works

Key facts
- 28Two passes through the same group
- Repeated layers
- 1M tokensMaximum output 128K tokens
- Context
- $1.40Per million uncached tokens
- API input
- $4.40Per million tokens
- API output
Z.ai used GLM-5.4 to design a six-axis robot arm in FreeCAD. The model can interpret visual material and write the code to build a design. Inside, it runs the same group of 28 layers twice.
What can you give it?
GLM-5.4 accepts text, images, video and files and responds in text, including code. In Z.ai’s 23 November demonstration, it wrote code that built a mechanical arm in FreeCAD. The result was a computer-aided design. A separate demonstration used code to generate and edit a music video.
The model guide gives a context window of one million tokens and a maximum response of 128K tokens. A token is a small unit of content the model processes. A large context window lets a developer supply more of a codebase or a long conversation in one request.
Why run the same layers twice?
A language model processes its input through a sequence of layers. Ordinarily each layer passes its result to the next. GLM-5.4 sends the result of one group of 28 layers back through that same group for a second pass. The second pass starts with what the first has already worked out. It adds processing depth while reusing the same learned values, or weights.
Z.ai’s technical account includes a controlled comparison on a smaller, 30-billion-parameter model. There, the looped version used around 10% more training computation and produced answers averaging 10–14% shorter on several tests. Those results measure the smaller experiment. Z.ai also reports that the full model can spend too long revisiting an answer. In ZCode, users can choose a lower reasoning setting for a routine edit.
Coding subscription or metered API?
| Access | What it covers |
|---|---|
| GLM Coding Plan | Z.ai includes GLM-5.4 on Lite, Pro, Max and Team. It runs in ZCode and other supported coding tools. |
| Z.ai Model API | Applications can request glm-5.4. Z.ai lists $1.40 per million ordinary input tokens, $0.26 for cached input and $4.40 for output. |
The two routes have different billing. For example, sending 100,000 uncached input tokens and receiving 10,000 output tokens costs $0.184 at the published API rates, checked on 2 December. Coding subscribers draw on their plan allowance. The ZCode guide says eligible weekly plans can use 1.5 times as many tokens with GLM-5.4 as with GLM-5.3. Legacy V1 plans are excluded.
Can you download the weights?
At launch, Z.ai said it intended to publish the weights after further safety work. As of 2 December, the routes we could verify were hosted. Z.ai now documents the Model API, which its original announcement had described as forthcoming. The lab’s public model catalogue had no downloadable GLM-5.4 checkpoint at the time of our check.
More in Large Language Models
All LLMs →- Z.ai / ZhipuGLM-5.3a post-training update with an emergent cyber capability
- Z.ai / ZhipuGLM-5.3-Flasha new base, natively multimodal, at a tenth of GLM-5.2's price
- AmazonAmazon Ergo-1.0access, pricing and open weights
- Google DeepMindGemini 4 Argonlonger reasoning, coding and cyber defence
- OpenAIGPT-5.6the flagship from 9 July to 3 September 2026
- OpenAIGPT-6 Astrathe new generation, rolling out from 3 September 2026