GPT Image 2.5 is live — OpenAI's newest image model, targeted edits that leave the rest of the frame alone

GLM 5.4 — Loop Transformer Coding & Vision Model

Run GLM 5.4 on reAPI for multi-file coding, visual debugging, and streamed tool agents. Built on Z.AI's 1M-context Loop Transformer with preserved thinking and pay-as-you-go billing.

Highlights
GLM 5.4 Loop Transformer · 1M context · 128K output
Best for
Repository coding, multi-turn agents, visual reasoning
Input
Text, visuals, video, and document URLs
Output
Text, reasoning trace, and streamed tool calls

Pricing

Credit-based — 1 credit = $0.001 USD. Pay only for completed generations.

Pricing by group · glm-5.4

Pricing by group
glm
glm-5.4
Default0.7×
Input$0.98
Output$3.08
Cache read$0.182

USD per 1M tokens. Tool charges may apply.

What is GLM 5.4?

GLM 5.4 is Z.AI's flagship multimodal model released on November 23, 2026, and the first built on its Loop Transformer design. Instead of stacking extra weights, it runs 28 shared layers across two passes on the 750B GLM-5 base for deeper step-by-step reasoning. With a 1M context window and 128K output cap, GLM 5.4 handles repository-scale refactors, 3D or CAD code, streamed tool agents, and visual or document analysis in one session.

What you can build with this model

Real-world workflows and production use cases you can build and ship with this model.

GLM 5.4 workflow showing multi-file engineering tasks and looped reasoning

GLM 5.4 for multi-file coding

Keep full modules, stack traces, and migration notes inside GLM 5.4's 1M context window instead of slicing files apart. Looped layer depth holds long causal chains across backend refactors, FreeCAD scripts, and custom shaders. Run on low effort for quick edits, then step up to high or max on tough bugs.

Explore GLM 5.4 docs
GLM 5.4 workflow showing multimodal analysis across screenshots, clips, and documents

GLM 5.4 for visual and document tasks

Pass public HTTP or HTTPS URLs for visuals, clips, or documents directly into GLM 5.4 alongside your prompt. It reads PNG and JPEG screenshots, H.264 MP4 clips, and PDF, Word, Excel, or slide decks in the same chat endpoint. Keep document blocks separate from visual or clip inputs in each request.

GLM 5.4 workflow showing streamed tool calling paired with preserved thinking

GLM 5.4 for streamed tool agents

GLM 5.4 enables Preserved Thinking by default across every endpoint so multi-turn agents keep prior reasoning intact. Echo the unmodified assistant turn alongside your tool outputs, and turn on tool streaming to parse function arguments incrementally. Dual protocol routing also supports Anthropic Messages on reAPI for Claude-style SDKs.

Why reAPI for GLM 5.4

Control GLM 5.4 thinking depth

Deep reasoning stays on in GLM 5.4, and omitting an effort tier defaults upstream to max—which can trigger long reflection loops. Pick low effort for fast extraction or routing, and reserve high or max for hard engineering work.

Strict GLM 5.4 output caps

Live checks on December 4, 2026 showed upstream enforces max_tokens up to 131,072 on GLM 5.4 while ignoring max_completion_tokens. reAPI maps your cap onto max_tokens automatically so long runs stay inside budget.

One key for GLM 5.4 and more

Call GLM 5.4 via OpenAI Chat Completions or Anthropic Messages using one pay-as-you-go reAPI balance. Skip monthly Coding Plan seats and share the same key across every other chat and media model on reAPI.

How to start using GLM 5.4

  1. step 01

    Test GLM 5.4 in the playground

    Run a coding or visual prompt in the GLM 5.4 playground above. Switch protocols, tune effort, and inspect the reasoning trace.

    Open
  2. step 02

    Create a GLM 5.4 key

    Sign in to reAPI, generate a key under API Keys, and store it on your backend. The same balance bills GLM 5.4 per token with no monthly subscription.

    Open
  3. step 03

    Ship GLM 5.4 in your app

    Point your OpenAI or Anthropic SDK to https://api.reapi.ai/v1 with glm-5.4. Cap max_tokens and stream GLM 5.4 responses.

    Open

Capabilities

GLM 5.4 Loop Transformer

GLM 5.4 executes 28 middle layers twice with progressive gates, hybrid KV caching, and sparse attention reuse for deeper reasoning.

GLM 5.4 1M context & 128K output

Fit full repositories into GLM 5.4's 1,048,576-token window and generate up to 131,072 output tokens via max_tokens.

GLM 5.4 thinking tiers

Choose low, high, or max effort in GLM 5.4 to trade speed against depth. Turning thinking off returns HTTP 400.

GLM 5.4 multimodal URLs

Send public HTTP or HTTPS links for PNG/JPEG visuals, MP4/MKV/MOV clips, or PDF and Office files to GLM 5.4.

GLM 5.4 dual-protocol endpoints

Call GLM 5.4 through Chat Completions with all 16 official parameters, or Anthropic Messages for Claude Code and Anthropic SDKs.

GLM 5.4 sampling & JSON mode

Tune temperature (0–1), top_p (0.01–1), greedy decoding, stop strings, or JSON mode in GLM 5.4 one knob at a time.

GLM 5.4 vs GLM 5.3

Compare GLM 5.4 against GLM 5.3 across architecture, modalities, default thinking state, and live reAPI access before migrating.

Difference
GLM 5.4
GLM 5.3
Architecture
GLM 5.4 Loop Transformer (28 layers × 2 on 750B base)
Single-pass 750B GLM-5 base
Modalities
GLM 5.4 reads text, public visual, clip, and document URLs
Text-only
Preserved Thinking
On by default across every GLM 5.4 endpoint
Off by default on standard API
Effort tiers
GLM 5.4 mandatory thinking: low, high, or max
Mandatory thinking: low, high, or max
Context & output
1M context; 128K output enforced via max_tokens
1M context; 128K output
reAPI availability
Live pay-as-you-go GLM 5.4 (OpenAI & Anthropic endpoints)
Live pay-as-you-go GLM 5.3 (OpenAI & Anthropic endpoints)

Specs reflect Z.AI's GLM 5.4 docs and November 23, 2026 launch post; endpoint behavior reflects live reAPI probes on December 4, 2026.

Frequently asked questions

Common questions about this model.

GLM 5.4 uses pay-as-you-go token billing on reAPI across input, output (thinking plus visible tokens), and cached reads. New accounts receive 100 starter credits to run quick smoke tests before topping up; check the live pricing table above for current rates.

No. Calling GLM 5.4 through reAPI requires no monthly plan or Coding Plan subscription. Credits never expire ($1 = 1,000 credits), and upstream errors or aborted streams settle at zero charge.

Sign in to reAPI, open API Keys, create a key, and store it server-side. Send requests to https://api.reapi.ai/v1/chat/completions or /v1/messages with model ID glm-5.4.

It loops 28 shared middle layers twice on Z.AI's 750B GLM-5 base using progressive gates, hybrid KV caching, and sparse attention reuse. That adds effective compute depth for hard coding and reasoning without doubling weights.

Both share a 1M context window and 128K output cap, while GLM 5.4 adds two-pass looping, visual/clip/file understanding (GLM 5.3 is text-only), and Preserved Thinking enabled by default across all endpoints.

No. Deep thinking is always on—passing disabled or unsupported effort strings returns HTTP 400. Use low, high, or max effort to control thinking depth.

Z.AI notes that it can enter marathon thinking loops on its upstream default of max effort. Set effort to low for routine prompts, pass an explicit max_tokens cap, and turn streaming on.

Use max_tokens (1 to 131,072). Live December 4 checks showed upstream enforces max_tokens strictly while ignoring raw max_completion_tokens; reAPI maps admitted caps onto max_tokens automatically.

It accepts public HTTP or HTTPS URLs for PNG/JPEG (up to 5 MB), MP4/MKV/MOV (up to 200 MB), and PDF/TXT/Office files (up to 50 MB). Base64 data URIs are rejected on reAPI, and files cannot mix with visual or clip blocks in one call.

Yes. Live December 4 probes confirmed it works on reAPI's /v1/messages endpoint for JSON, SSE streaming, and tool calls, alongside primary /v1/chat/completions support.

Not yet. Z.AI stated on November 23, 2026 that it plans to release open weights after safety hardening finishes, so access is hosted-only as of December 4, 2026.

Standard function tools and tool_stream work reliably. Z.AI's built-in web_search tool returned HTTP 400 (code 1214) in our December 4 probe, so implement web lookup through your own function tool.
docs/api/glm-5-4

API reference

Drop-in code and the full parameter table.

curl https://api.reapi.ai/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-5.4","messages":[{"role":"user","content":"Design a lock-free ring buffer in Rust and explain its memory ordering."}],"thinking":{"type":"enabled","clear_thinking":false},"reasoning_effort":"low"}'

Parameter validation failed

Rejected synchronously with the failing field named. Check enum values, ranges, and URL fields — nothing is charged.

Authentication or balance issue

401 means a missing or invalid Bearer key; 402 means the reserve exceeds your balance. Manage keys and credits in the console.

Content or material rejected

Reference material and outputs pass automated moderation. Rejected tasks fail with a clear error and a full refund.

Task failed or timed out

A task that reaches a failed state is never charged — the reserve refunds automatically. Keep the task id and retry when ready.

start building

Ready to ship?

Try it in the playground or grab an API key to integrate now.