Skip to main content
Z.ai

GLM 5.4

Z.ai's first flagship model with native vision capabilities, featuring Z.ai's first Loop Transformer architecture with enhanced reasoning and generalized coding capabilities

Released
Dec 2, 2026
Modality
Text + Image + Video
Context
1M tokens
Price in / cached input / out
$1.26 / $0.234 / $3.96per 1M tokens

Quickstart

OpenAI-compatible: change the base URL, and the setup is complete.

from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.you.com/v1",
    api_key=os.environ["YDC_API_KEY"],
)

response = client.chat.completions.create(
    model="glm-5.4",
    messages=[{"role": "user", "content": "Summarize this support ticket in two sentences."}],
)

print(response.choices[0].message.content)

Specifications

Technical details, capabilities, pricing, and data handling.

Model info

Input Modality
Text, Image, Video
Output Modality
Text
Context Window
1M

Capabilities

Reasoning
Supported
Structured output
Supported
Tool use
Supported
Web search
Available with You.com Search
Explicit caching
Not supported
Implicit caching
Automatic

Pricing

Input
$1.26
Cached input
$0.234
Output
$3.96

Data handling

Zero data retention
Supported
No training on customer data
Supported
Regions

Providers

Access models through multiple providers with automatic routing and built-in failover.

Providers serving GLM 5.4
ProviderZDRNo trainingRegion
Z.aiYesYes

When to use GLM 5.4

Guidance based on the specifications on this page.

Best for

  • Deep reasoning without a bigger modelGLM-5.4 is Z.ai's first Loop Transformer, running 28 GLM-5 layers twice; Z.ai says it reaches the level of 2T-3T parameter models.
  • Generalized coding across modalitiesAccepts video, image, text, and file input, and writes code to build games, edit video, and handle 3D modeling and mechanical design.
  • Long-context agent workflowsA 1M-token context window and up to 128K output tokens, with function calling and streaming.
Get API key

Consider alternatives for

  • You need fast, short answersZ.ai notes GLM-5.4 can fall into long "marathon thinking" loops, and quotes 70-80 tokens/s at peak load.
  • You need a lighter, cheaper modelGLM-5.3 Flash is Z.ai's smaller sibling, with 320B total / 18B active parameters.

Build with Inference Router

Share a few details and a solutions engineer will reach out to show you what your workloads cost on open-weight models.