Z.ai Opens GLM-5.4 API to Developers at No Extra Cost
Z.ai's first Loop Transformer flagship lands on the public API at GLM-5.3 prices, running 28 layers twice for deeper reasoning without extra parameters.
Takeaways
- GLM-5.4 API is now generally available on Z.ai and partner platforms.
- Pricing is unchanged from GLM-5.3: $1.40 input and $4.40 output per 1M tokens.
- Loop Transformer runs 28 shared layers twice at 750B scale for deeper reasoning without extra params.
- Z.ai claims intelligence comparable to 2T-3T parameter models; internal win rate 51.1% vs GLM-5.3.
- Independent KingBench 4: 33.2/60, 1st among open models but 4x slower than Gemini 4 Neon.
- Supports 1M context, 128K output, native vision; prone to marathon thinking at max effort.
Z.ai has released the GLM-5.4 API through its public pay-as-you-go endpoint. For roughly a week, the model was limited to the GLM Coding Plan, ZCode, and Z.ai Chat, while third-party products continued using GLM-5.3 during a safety review. External applications can now access the new flagship at the same per-token rates as its predecessor.
The API catches up
Developers can call GLM-5.4 through Z.ai’s standard API by setting the model ID to glm-5.4. The release preserves GLM-5.3’s input and output prices:
| Model | Input | Output |
|---|---|---|
glm-5.3 |
$1.40 | $4.40 |
glm-5.4 |
$1.40 | $4.40 |
Matching unit prices simplify migration for teams that already budget around GLM-5.3. Total spend still depends on output length, reasoning effort, retries, and tool-call behavior.
Two passes, shared weights
According to Z.ai, GLM-5.4 runs 28 weight-shared layers from the GLM-5 base twice. The company describes it as a 750B-scale system with reasoning performance comparable to models containing 2 trillion to 3 trillion parameters. Continued training adapted the existing GLM-5 base to the looped architecture, avoiding a full pretraining run.
A standard Transformer sends each token through its layer stack once, with a separate set of learned weights at each layer. A Loop Transformer reuses the same block, processing the intermediate representation again so the model can refine it through additional computation.
Repeated execution increases sequential compute and inference time while avoiding a second set of weights for the reused layers. Providers gain more reasoning depth without doubling the parameter memory required by that section of the model.
Benchmarks, with caveats
Without a full model card, the available evidence consists of Z.ai’s internal comparisons, vendor throughput claims, and independent coding tests:
| Evaluation | Result | Source |
|---|---|---|
| Head-to-head against GLM-5.3 | 51.1% wins, 25.7% ties, 23.1% losses | Z.ai internal evaluation |
| KingBench 4 | 7th overall and 1st in the open-model category | AICodeKing |
| KingBench 4 score | 33.2/60 at maximum effort, up from GLM-5.3’s 27.5/60 | AICodeKing |
| Generation speed | Up to 200 tokens per second off-peak and 70 to 80 at peak | Z.ai |
| Controlled ablation | Average output length fell 10% to 14% across tests including GPQA-Diamond and MMLU-Pro | Z.ai |
The public material does not yet provide enough detail to reproduce every result, including hardware, sampling settings, prompt sets, and concurrency levels. Z.ai attributes the shorter outputs mainly to more concise reasoning traces.
Depth costs time
AICodeKing’s KingBench 4 run took 431 minutes, compared with 109 minutes for Gemini 4 Neon on the same suite. That result puts GLM-5.4 at nearly four times the wall-clock duration in that test.
Early reviewers also reported overthinking on simple tasks and higher token use than Gemini 4 Neon, while Z.ai warns that some prompts can trigger extended reasoning loops. These behaviors can reduce throughput and raise per-task costs even when the listed token rates remain unchanged.
Published early tests found medium or high reasoning effort more balanced than the maximum setting. Teams should start with medium effort, reserve higher settings for difficult failures, and verify the exact request field in the current API docs.
Point an OpenAI client at it
Because Z.ai exposes an OpenAI-compatible chat-completions endpoint, an existing Python client can switch by changing the base URL and model ID:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["ZAI_API_KEY"],
base_url="https://api.z.ai/api/paas/v4",
)
response = client.chat.completions.create(
model="glm-5.4",
messages=[
{
"role": "user",
"content": "Refactor this React component...",
}
],
)
print(response.choices[0].message.content)
OpenAI compatibility covers the familiar request shape, while framework adapters may map streaming, tool calls, structured output, image input, and reasoning controls differently. Production testing should exercise each feature the application uses.
The model accepts a context window of up to 1 million tokens, can generate as many as 128,000 output tokens, and supports native image input for screenshots and interface mockups. Long contexts and large output limits increase latency and memory pressure, so applications should send only the material needed for the task.
- Pin the model ID to
glm-5.4in staging before changing production traffic. - Replay representative prompts and compare task success, tool-call accuracy, output tokens, and latency.
- Test streaming, cancellation, retries, and rate-limit handling under expected concurrency.
- Set explicit output and reasoning limits where the client supports them.
Choose by workload
| Workload | Fit | Reason |
|---|---|---|
| Long-horizon coding | Strong candidate | Additional reasoning depth can help with planning, revision, and multi-file changes. |
| Tool-using agents | Strong candidate | The model targets tasks that require several dependent decisions and calls. |
| Screenshot-to-code workflows | Strong candidate | Native vision and code generation can share one model call. |
| High-throughput APIs | Test carefully | Looped inference can increase wall-clock latency and reduce request capacity. |
| Extraction and classification | Weak fit | GLM-5.3-Flash or another lightweight model should complete simple tasks faster. |
At list price, the API gives teams a practical way to test looped inference without hosting a 750B-scale model. Its value will depend on whether higher task completion offsets the added latency and token use.
The production trade
Weight sharing gives model builders another scaling lever: reused layers constrain parameter memory, while repeated passes add inference compute. GLM-5.4 packages that tradeoff behind a standard API and keeps the previous flagship’s token rates.
A production evaluation should measure task completion, tool-call correctness, input and output tokens, p50 and p95 latency, retry rates, and total cost per successful task. Those measurements will show whether the loop improves a coding or agent workload enough to justify its longer execution time.