Skip to content
glm-5.4ChatExamples verified 2026-09-25

GLM-5.4

Zhipu's flagship Loop Transformer model with native vision and generalized coding, 1M context, 131,072 max output, $1.4 / $4.4.

GLM-5.4 (glm-5.4) is Zhipu's flagship Loop Transformer model with native multimodal vision (text, images, video, and files), a 1M-token context window, and up to 131,072 output tokens. Official list price is $1.4 input and $4.40 output per 1M tokens (cached input $0.26). Served in the GLM Official API group over Chat Completions, Responses, and Anthropic Messages.

Official price
$1.40 / $4.40/ 1M tokensInput / output
Context window
1M tokens1,000,000
Notes
  • Thinking can't be turned off; reasoning_effort=none returns 400.
  • Natively accepts text, image, video, and file inputs.
  • Always thinks (reasoning_effort: low / high / max); max_tokens above 131,072 returns 400.
  • Available in the GLM Official API group across Chat Completions, Responses, and Anthropic Messages.

Pricing

Official price in USD. Actual charge = official price × group multiplier.

Input
$1.40 / 1M tokens
Cached input
$0.26 / 1M tokens
Output
$4.40 / 1M tokens

Endpoints

Quick start

Replace sk-your-key with a key whose group includes this model.

OpenAI-compatible Base URL
https://api.hop-base.com/v1

curl · Chat Completions

curl https://api.hop-base.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.4",
    "temperature": 1,
    "top_p": 0.95,
    "reasoning_effort": "max",
    "messages": [
      { "role": "user", "content": "Hello, introduce yourself" }
    ]
  }'

curl · Responses

curl https://api.hop-base.com/v1/responses \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.4",
    "input": "Hello"
  }'

Python · OpenAI SDK

from openai import OpenAI

client = OpenAI(base_url="https://api.hop-base.com/v1", api_key="sk-your-key")

response = client.chat.completions.create(
    model="glm-5.4",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

FAQ

Which group do I need?
The key must include the GLM Official API group; keys without it receive 404 for glm-5.4. Add the group to an existing key under API Keys in the console, or create a new key with it.
Which protocols and input modalities are supported?
POST /v1/chat/completions, POST /v1/responses, and POST /v1/messages are all supported, along with native text, image, video, and file inputs.
How much does it cost?
Official list price is $1.4 input, $0.26 cached input, and $4.40 output per 1M tokens; max_tokens caps at 131,072 (shared by thinking and answer). Actual charge = official price × group multiplier.

Same family

Prices come from the public catalog; limits come from specs exported from the gateway’s validation code. Actual charge = official price × group multiplier.