The short answer: Zhipu's flagship GLM-5.4 (model ID glm-5.4) is live on HopBase for multimodal reasoning, generalized coding, and long-horizon agent workflows. Built on a Loop Transformer architecture, it natively accepts text, image, video, and file inputs within a 1,000,000-token context window and generates up to 131,072 output tokens shared between reasoning and final text. In the GLM Official API group, glm-5.4 is served simultaneously over OpenAI Chat Completions (POST /v1/chat/completions), OpenAI Responses (POST /v1/responses), and Anthropic Messages (POST /v1/messages), so Claude Code, Codex CLI, and standard SDKs connect directly. Official list pricing is $1.40 per 1M input tokens, $0.26 per 1M cached input tokens, and $4.40 per 1M output tokens — matching text-only glm-5.3 dollar for dollar with flat pricing across the entire 1M window. Attach the GLM Official API group to your key and verify glm-5.4 via GET /v1/models.
GLM-5.4 vs GLM-5.3 vs GLM-5.3-Flash: Official List Prices and Specs
HopBase serves three Zhipu GLM-5 models in the GLM Official API group: the new multimodal flagship glm-5.4, the text-only predecessor glm-5.3, and the high-throughput lightweight multimodal model glm-5.3-flash. Every figure below reflects Zhipu's (Z.ai) published international list price and verified gateway behavior:
| Specification | glm-5.4 |
glm-5.3 |
glm-5.3-flash |
|---|---|---|---|
| Architecture & role | Loop Transformer flagship (vision + generalized coding) | Previous text-only flagship | Lightweight MoE (320B total / 18B active) |
| Input modalities | Text, image, video, file | Text only (images return HTTP 400) | Text, image, video, file |
| Context window | 1,000,000 tokens (flat rate, no long-context tier) | 1,000,000 tokens | 1,000,000 tokens |
Max output (max_tokens) |
131,072 tokens | 131,072 tokens | 131,072 tokens |
Reasoning (reasoning_effort) |
Always on (low / high / max) |
Always on (low / high / max) |
Always on (low / high / max) |
| Tool calling & structured output | tools, tool_choice, response_format |
tools, tool_choice, response_format |
tools, tool_choice, response_format |
| Protocols in GLM Official API | Chat Completions, Responses, Anthropic Messages | Chat Completions only | Chat Completions only |
| Official list · Input | $1.40 / 1M tokens | $1.40 / 1M tokens | $0.15 / 1M tokens |
| Official list · Cached input | $0.26 / 1M tokens | $0.26 / 1M tokens | $0.03 / 1M tokens |
| Official list · Output | $4.40 / 1M tokens | $4.40 / 1M tokens | $0.50 / 1M tokens |
If your workload currently runs on glm-5.3, switching the model string to glm-5.4 unlocks native image, video, and file understanding plus native /v1/responses and /v1/messages support at the exact same $1.40 / $0.26 / $4.40 list price. Pair glm-5.4 with glm-5.3-flash ($0.15 / $0.03 / $0.50) when routing high-volume document triage or lightweight multimodal extraction. HopBase bills official list price multiplied by actual token usage; check your key's effective group rate in the signed-in console catalog, or contact our team on the pricing page for enterprise volume quotes.
Protocols, Parameters, and Operational Rules
- Three protocols and Base URLs: Use
https://api.hop-base.com/v1for OpenAI Chat Completions (POST /v1/chat/completions) and OpenAI Responses (POST /v1/responses, compatible directly with Codex CLIwire_api = "responses"). Usehttps://api.hop-base.com(without/v1) for Anthropic Messages (POST /v1/messages, compatible directly with Claude Code and the Anthropic SDK). - Always-on thinking and sampling:
glm-5.4always generates a thinking trace inreasoning_content(ordelta.reasoning_contentwhen streaming).reasoning_effortacceptslow,high, ormax; sendingnonereturns HTTP 400. Zhipu's recommended configuration for complex coding and reasoning istemperature: 1,top_p: 0.95, andreasoning_effort: "max". - Output ceiling and token accounting:
max_tokensaccepts integers from1to131,072(values above131,072return 400). Thinking tokens and final answer tokens share that budget, andusage.completion_tokensalready includes reasoning tokens without double counting. When streaming Chat Completions, include"stream_options": {"include_usage": true}to receive the finalusageobject. - Tool calling and structured output: Pass standard OpenAI
toolsandtool_choicedefinitions (addtool_stream: truewhen streaming tool calls for incremental argument deltas, and matchtool_call_idon follow-uptoolturns), or setresponse_format(json_objectorjson_schema) for schema-constrained JSON output. - Data handling and security: Prompts and outputs are used only to complete the request — there is no long-term content retention and customer traffic is never used to train models. Billing metadata (model, token counts, latency, status) is retained for invoices and audits, while failed requests may be held briefly for troubleshooting and then deleted automatically.
Three-Minute Quickstart (curl, Python SDK, and Vision Input)
Ensure your API key includes the GLM Official API group under API Keys in the console, then send a first request with curl:
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": "Summarize in three sentences where GLM-5.4 improves over GLM-5.3 for agent workflows." }
]
}'
With the official openai Python SDK, point base_url at https://api.hop-base.com/v1 and set model="glm-5.4":
from openai import OpenAI
client = OpenAI(
base_url="https://api.hop-base.com/v1",
api_key="sk-your-key",
)
resp = client.chat.completions.create(
model="glm-5.4",
temperature=1,
top_p=0.95,
reasoning_effort="max",
messages=[{"role": "user", "content": "Write a Python function that retries HTTP 429 responses with exponential backoff and jitter."}],
)
msg = resp.choices[0].message
print(msg.content)
print(resp.usage)
Vision input note: Unlike glm-5.3 (which rejects images with HTTP 400), glm-5.4 natively reads images, video, and files. Pass an HTTPS image URL or a data:image/...;base64,... URI inside a standard messages[].content array:
resp = client.chat.completions.create(
model="glm-5.4",
reasoning_effort="high",
messages=[{
"role": "user",
"content": [
{"type": "text", "text": "Extract every visible label from this image and return a clean JSON summary."},
{"type": "image_url", "image_url": {"url": "https://hop-base.com/assets/blog/glm-5.3-launch.jpg"}},
],
}],
)
print(resp.choices[0].message.content)
For full parameter tables, Responses API payloads, and Anthropic Messages examples, read the GLM-5.4 model documentation and compare full catalog rates on the HopBase pricing page.
FAQ
Why am I getting 404 model_not_found when calling glm-5.4?
glm-5.4 is served through the GLM Official API group, so keys without that group receive a 404. Open API Keys in the HopBase console, add the GLM Official API group to your existing key (or create a new key with it), and call GET https://api.hop-base.com/v1/models to confirm glm-5.4 is listed before sending production traffic.
Can I turn off thinking on glm-5.4, and how are reasoning tokens billed?
Thinking cannot be turned off on glm-5.4: reasoning_effort accepts low, high, or max, and passing none returns HTTP 400. Choose low when you want minimal thinking latency and token usage. The max_tokens cap of 131,072 is shared by reasoning_content and content, and usage.completion_tokens includes both at the $4.40 per 1M output list price.
Should I migrate from glm-5.3 or glm-5.3-flash to glm-5.4?
Upgrade from glm-5.3 to glm-5.4 whenever you want Loop Transformer coding gains, native image/video/file vision, or direct /v1/responses and /v1/messages compatibility for Codex CLI and Claude Code — the official list price stays identical at $1.40 input, $0.26 cached input, and $4.40 output per 1M tokens. Keep glm-5.3-flash ($0.15 / $0.03 / $0.50 per 1M tokens) alongside it for high-volume multimodal routing where unit cost matters most.