Notice: MAI Image 2.7 launch limited-time 20% off, covering the full text-to-image and image editing lineup, try it now
Notice: MAGI 2 launch limited-time 20% off, covering text-to-video, image-to-video, and reference-to-video across the board. Try it now
Notice: Seed Audio 1.5 launch limited-time 20% off, covering text-to-audio, video dubbing, audio track separation, and video translation across the board. Try it now
Notice: HeyGen Avatar 6 Turbo is 20% off for a limited time, and all three video pipelines are eligible.Try it now
Notice: Midjourney Niji 8 is now available, 20% off · Create now
Notice: Hunyuan Image 3.0 launch limited-time 20% off, for both text-to-image and instruction-based editing · Try it now
Announcement 1 of 6
glm-5.4 detail page hero image: creamy light halo and negative space on the left; right side layered with semi-transparent glass knowledge floating cards, two bands of light encircling it twice; iridescent glass lettering GLM 5.4 embedded in the front card, with a cool blue-pink-purple gradient.

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

glm-5.4
Context window
1,048,576
Input
Max output
131,072 tokens
Release date
2026-12-02
Streaming Structured JSON

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.

  • 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.

Related Models

View all models →

Same Type