Zhipu AI
GLM 5.4
glm-5.4
Zhipu Z.ai's flagship text model, built on the Loop Transformer architecture, with a 1M context window and up to 128K output; thinking mode is always on, making it suited to complex programming and long-horizon reasoning tasks
- Context window
- 1,048,576
- Input
- Max output
- 131,072 tokens
- Release date
- 2026-12-02
Try glm-5.4 online
Pricing
glm-5.4 /1M tokens
| Specifications | Unit Price |
|---|---|
| Input | $1.177 |
| Cached input | $0.260 |
| Output | $4.118 |
Overview
Positioning overview
GLM 5.4 is Zhipu Z.ai's flagship model, designed for complex programming and long-horizon reasoning tasks. It is the first GLM flagship model built on the Loop Transformer architecture, with a context length of 1M and a maximum output of 128K per request; both input and output are text. Thinking mode is always on, making it suitable for developers and teams that need to handle extremely long code and documents and complete multi-step reasoning.
Key highlights
- Loop Transformer architecture — reuses the 28 layers of the GLM-5 base model and runs two rounds of iteration, deepening reasoning without increasing the parameter count.
- 1M context and 128K output — large code repositories and long documents can be placed in the context at once, and it also supports long-form code and text output.
- Thinking mode always on — every request thinks before answering; the thinking parameter only supports enabled and cannot be turned off.
- Do more kinds of tasks with code — it can write code to generate or edit videos, build games, and complete 3D modeling.
Capabilities
- Complex programming — for programming tasks such as large software engineering that require maintaining logical consistency across multiple steps.
- Long-horizon reasoning — suitable for problems with long causal chains that require multi-step derivation.
- Ultra-long context processing — reads and analyzes code repositories or long documents within a 1M context and outputs text results.
- Generate visual and interactive content via code — the output is code and text; results such as video generation or editing, games, and 3D modeling require running this code.
Use cases
- Large codebase development and maintenance — take multiple source files and requirement descriptions together as input to complete cross-file analysis, modification, and code generation.
- Multi-step reasoning tasks — handle technical problems that require long-chain analysis and repeated verification.
- Games and interactive prototypes — have the model write code for games or interactive pages, then run and iterate locally.
- Code-driven video and 3D production — have the model write scripts that generate or edit videos or build 3D models, executed by the corresponding tools.
Limitations and model selection advice
This model takes text as input and produces text as output; it does not directly generate image or video files. Thinking mode cannot be turned off, so when calling it, reserve enough output length and response time for the thinking process. If the task is complex programming, long-horizon reasoning, or ultra-long context analysis, GLM 5.4 can be a priority choice.
What's new
View changelog →- New model GLM 5.4 is now available: 1M context, always-on thinking
Frequently asked questions
View all FAQs →-
How large can the context and output length be?
The context window is 1 million tokens, with a maximum output of 128K tokens per request. It is suitable for reading and answering questions about entire codebases and very long documents, as well as scenarios that require long-form output; when planning input, split it according to these two limits.
Articles
View all articles →-
Guide
GLM 5.4 API Guide: Capabilities, First Request and Pricing
1M context and always-on thinking, from your first request to a cost estimate
4 min read -
Comparison
GLM 5.4 vs Other LLMs: A Developer's Guide to Choosing
Decide by task type, length, latency and cost per task
4 min read -
Tutorial
5 GLM 5.4 Use Cases for Developers: From Large Codebases to 3D
3 min read
Related Models
View all models →Same Type
-
Gemini 4 Google $0.057 /1M tokens -
GPT 5.6 OpenAI $0.050 /1M tokens -
Claude Fable 5.2 Anthropic $0.102 /1M tokens -
Claude Sonnet 5.5 Anthropic $0.051 /1M tokens -
Grok 4 xAI $0.210 /1M tokens -
GLM 5.3 Zhipu AI $0.855 /1M tokens -
Claude Opus 5.5 Anthropic $0.102 /1M tokens -
Gemini 3.8 Google $0.227 /1M tokens -
Kimi K3 Moonshot AI $0.232 /1M tokens -
Kimi K3.1 Pro Moonshot AI $0.216 /1M tokens -
DeepSeek V4 DeepSeek $0.014 /1M tokens -
GPT 6 OpenAI $0.013 /1M tokens