Skip to content

GLM 5.4

GLM 5.4 is Z.ai's flagship model and the first built on its Loop Transformer architecture. It runs 28 layers of the GLM-5 base twice in each forward pass, which adds reasoning depth without adding parameters. It reads text and images, and works with up to 1M tokens of context.

Model details

Specification Value
Model ID glm-5-4
Provider Z.ai
Parameters 744B, 40B active per output token
Context window 1,048,576 tokens
Max output 131,072 tokens
Input Text, image
Output Text
Features Tool calling, JSON mode, reasoning
Reasoning effort high (always on)
Released 23 November 2026
Knowledge cutoff April 2026
License MIT License

Prices and your rate limits are on the model's page in the Console. Image input works through the API; the Playground in the Console takes text only.

Good for

According to Z.ai, GLM 5.4 is built for what it calls generalized coding, and puts it on par with models of 2 to 3 trillion parameters. It suits:

  • Large-scale coding: repository-wide changes and long engineering tasks
  • Complete builds: games, and code that generates and edits video
  • 3D and mechanical design: modeling through code
  • Agentic work: tool use and multi-step tasks over long contexts

Z.ai hasn't published benchmark results for GLM 5.4 yet. Test it on your own tasks before you choose.

Call the model

curl -X POST "https://inference.verda.com/v1/chat/completions" \
  -H "Authorization: Bearer <your key>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5-4",
    "messages": [{"role": "user", "content": "What is the best viewpoint in Helsinki?"}],
    "max_tokens": 8192
  }'

For Python, Node and coding agents, see the Quickstart and Coding agents.

Reasoning

GLM 5.4 always thinks before it answers, at high effort. It returns its reasoning in reasoning_content, and reasoning counts as output tokens. Reasoning can't be turned off: reasoning_effort none isn't supported.

Z.ai notes that the model can reason at length on hard tasks, so leave room in max_tokens for the answer after the reasoning.

In multi-turn conversations and tool calls, send back the complete assistant message, including reasoning_content and tool_calls, not only content.