Z.ai’s new flagship model GLM-5.4 arrived on 23 November 2026, and the fastest way most developers will actually use it is not Z.ai’s own chat — it is inside Claude Code. The model plugs into Claude Code through Z.ai’s GLM Coding Plan, using an Anthropic-compatible endpoint and a model name with a small but important suffix. The whole setup is a subscription, one API key, and a few lines in a settings file.

Quick answer: GLM-5.4 runs in Claude Code via Z.ai's GLM Coding Plan: point the base URL at api.z.ai, set the model slots to glm-5.4[1m], and verify with /status.

What GLM-5.4 is — and what the loop actually does

GLM-5.4 is Z.ai’s first flagship built on a Loop Transformer. In a standard Transformer, each layer runs once per forward pass. In a Loop Transformer, a group of weight-shared layers runs for multiple iterations, refining the hidden states from the previous pass — a deeper network without adding parameters. The idea is not new: the 2018 Universal Transformer proposed weight-shared depth, and recent work on recurrent depth showed gains at small scales. Z.ai’s twist is that it did not train a looped model from scratch; it adapted an already pre-trained base model into a Loop Transformer through continued training, which it says raises the intelligence ceiling with relatively small extra compute.

The headline numbers, all from Z.ai’s own blog post of 23 November 2026, are 750 billion parameters, with 28 layers of the GLM-5 base model looped for two iterations. Z.ai claims the result reaches intelligence levels comparable to 2T–3T parameter models. Treat that as the vendor’s claim, not a measured result: at the time of writing, Z.ai has published no flagship benchmark scores for GLM-5.4 itself. The only hard numbers in its blog are from a controlled ablation on a 30-billion-parameter model with the same architecture, where the looped version — with about 10% more training compute — gained most on long reasoning chains in maths, scientific reasoning and long-context tasks, and cut average output length by 10–14% on tests like GPQA-Diamond and MMLU-Pro because part of the reasoning moved into the loop instead of the visible chain of thought. That is evidence the architecture works at scale, not a GLM-5.4 benchmark.

Two more facts matter before you set it up. First, GLM-5.4 adds vision and a 1-million-token context window, and Z.ai reports up to 200 tokens per second off-peak and 70–80 tokens per second at peak load. It arrives in a crowded flagship week — OpenAI’s GPT-6.2 Astra and Sol pair landed days earlier — so the practical question is not which model is biggest, but which one fits the way you already work. Second, it has a known weakness Z.ai admits openly: it tends to get caught in overly long “marathon thinking” loops. The prolonged reflection usually improves accuracy, Z.ai says — but it also burns time and credits, which is why the effort setting in Step 4 below is worth setting before your first real session.

What you need before you start

Three things, and the order matters because the most common setup failure is having the wrong one of the first two.

A GLM Coding Plan subscription. GLM-5.4 is available today only through the GLM Coding Plan, in ZCode and Z.ai Chat as well as in Claude Code. Every tier — Lite, Pro and Max — includes GLM-5.4, GLM-5.3 and GLM-5.3-Flash, according to Z.ai’s plan overview. The plan starts at $18 a month, as reported by Apidog’s guide after reading the plan overview on 24 November 2026; Z.ai has changed this plan several times during 2026, so check the current price on the subscribe page before you pay. The pay-as-you-go API is marked “coming soon” on Z.ai’s blog, and open weights are planned only after safety hardening — so for now, the Coding Plan is the only route in.

A Coding Plan API key — not a standard API key. Create it under Personal Coding Plan, then Plan Overview (Team plan users: Team Coding Plan, then My Plan). Z.ai treats plan keys and standard pay-as-you-go keys as separate, and for keys created on or after 16 October 2026, changing the endpoint does not change the key’s billing type. A pay-as-you-go key will not work for this setup.

A current Claude Code. Older builds do not recognise the [1m] model names. Run claude update before you start, and if you install fresh, Anthropic now recommends its native installer rather than npm.

Step 1 — Subscribe and create the key

Sign up for the GLM Coding Plan on z.ai, then create your Coding Plan key in the Plan Overview section described above and copy it somewhere safe. One more rule from Z.ai’s usage policy shapes everything that follows: the plan may only be used inside officially supported tools and products. Claude Code and Cursor are both on that list. Do not reuse the key in your own scripts, backends or apps — that is outside the plan’s terms.

A privacy note before you connect anything: with this setup, Claude Code sends your prompts, the files it reads and the output of the commands it runs to Z.ai’s servers, not to Anthropic’s. Read Z.ai’s privacy policy yourself before opening a repository that holds client code or secrets.

Step 2 — Point Claude Code at Z.ai

Open ~/.claude/settings.json and add or update the env block. Do not replace the whole file if it already holds other settings — merge these lines in:

{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your_zai_coding_plan_key",
    "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
    "API_TIMEOUT_MS": "3000000",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.4[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.4[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.4[1m]",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000"
  }
}

What each line does: ANTHROPIC_BASE_URL sends requests to Z.ai’s Anthropic-compatible endpoint instead of Anthropic’s. ANTHROPIC_AUTH_TOKEN is your Coding Plan key. The three model slots map Claude Code’s Opus, Sonnet and Haiku roles to GLM-5.4 — Z.ai’s own model-switching guide maps all three to glm-5.4[1m], though its Claude Code setup page puts the lighter glm-5.3-flash[1m] on Haiku. If you want cheaper background work (titles, short summaries), swap the Haiku line to glm-5.3-flash[1m]; if you want one model everywhere, keep all three as above. API_TIMEOUT_MS gives long reasoning runs room to finish, and the auto-compact window line is covered in the next step.

Step 3 — Turn on the 1M context window

The [1m] suffix is what switches on the million-token context. Without it, you get the standard context for the model. The suffix goes with the compact-window setting: "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000" tells Claude Code to compress the conversation when it approaches that window instead of failing. If Claude Code reports that the model with the [1m] suffix does not exist, upgrade Claude Code to the latest version and try again — that error means your build predates the suffix support.

Use the 1M window deliberately. A million tokens of context is what lets GLM-5.4 hold a whole large repository, a long log file or several design documents in one session — the kind of long-context work the loop architecture is built for. But every token in context costs credits, and Z.ai’s own guidance is that the loop’s gains show up most on long reasoning chains, not on quick one-line edits. For a small fix, the plain glm-5.4 name without the suffix is the cheaper call.

Step 4 — Verify the switch

Open a new terminal, move into your project folder and run claude. If it asks whether you want to use this API key, pick Yes. Then type /status and check two lines: the settings source should show your ~/.claude/settings.json, and the model line should read glm-5.4 or glm-5.4[1m]. If the model line still shows a Claude model, the settings file was not picked up — check that you edited the file in your home directory, not a project-level copy, and that the JSON is valid (a missing comma after any line silently breaks the whole block).

Set the effort level before your first real job

GLM-5.4’s effort defaults to max, and max effort plus the marathon-thinking tendency is the combination that burns credits on simple work. Type /effort inside a Claude Code session to switch thinking intensity. Low effort suits quick edits and short questions; high or max is for the long, multi-step work — a refactor across several files, a debugging chain, a design task — where the extra reflection actually pays. Z.ai’s switching guide notes that explicit effort settings override the default, and that unknown values fall back to max, so set it deliberately rather than leaving it to chance.

Using GLM-5.4 in Cursor, Codex and other tools

Claude Code is the best-documented path, but it is not the only one. Z.ai documents a different base URL per tool family:

Tool Base URL Model name
Claude Code, Goose https://api.z.ai/api/anthropic glm-5.4[1m]
Codex https://api.z.ai/api/v1 glm-5.4
Cursor, Cline and other OpenAI-compatible tools https://api.z.ai/api/coding/paas/v4 GLM-5.4 (uppercase in Cursor)

In Cursor, add a custom OpenAI-compatible model with the paas/v4 base URL and the model name in capitals — GLM-5.4. In Cline, pick the OpenAI Compatible provider, enter the same base URL and your Coding Plan key, then choose a custom model. The same rule applies everywhere: use the Coding Plan key, and only in tools Z.ai officially supports. If your agent tool does not allow custom model settings, you will need to wait for official support. The pattern — one key, one base URL, one model name — is the same idea as routing between providers through Hugging Face and OpenRouter, only here the router is Z.ai’s own endpoint.

What it costs

The honest answer is that the full price picture is not public yet. There is no pay-as-you-go API price because the API is not live, and Z.ai has not published per-token rates for GLM-5.4. What is known: the Coding Plan starts at $18 a month (Apidog, reading Z.ai’s plan overview on 24 November 2026), each plan has a 5-hour credit budget and a weekly credit budget, and every model burns credits at its own rate. Subscribers on V2, V3 and team plans received a 50% increase in their GLM-5.4 weekly usage allowance at launch, according to TechNode. In practice that means the cost question is really a quota question: the 1M context window and max effort are the two settings that spend your budget fastest, so keep them for the jobs that need them. If you would rather avoid subscriptions altogether, running a large model locally is the other route — our Edge0-145B guide walks through the memory maths and the licence catch.

Where GLM-5.4 shines — and where to be careful

Z.ai is pitching the model around what it calls Generalized Coding: code as the foundation for a much wider range of tasks. Its launch demos show the range it is aiming at — a self-narrated “Hello World” music video generated through code, a 6-axis robotic arm built through engineering-grade CAD modelling in FreeCAD, a complete game with movement, physics, maps and combat, and an interactive 3D bird-watching scene built from pure mathematical geometry and custom GLSL shaders. Those are Z.ai’s own demos, not independent tests, but they set the shape of the first jobs worth trying: long, multi-step builds where the model holds a whole plan in its head, not single-function snippets.

Three cautions belong in the same paragraph as the praise. First, there are no independent benchmark scores for GLM-5.4 yet — the “comparable to 2T–3T models” line is Z.ai’s claim, and the only controlled numbers published are the 30-billion-parameter ablation, not the flagship. Second, the marathon-thinking loop is real and admitted by the vendor; set /effort low for small jobs or watch a simple question turn into a long, expensive think. Third, everything you send goes to Z.ai’s servers, and the plan’s terms limit use to supported tools — this is not a key to wire into your own products.

Five jobs to try in your first session

Our take: do not judge GLM-5.4 on a hello-world script. The loop architecture is built for long chains, so test it where length is the point — and keep one eye on how long it thinks.

  1. A refactor across three or more files. Ask it to rename a concept through the codebase and update the callers. This is the long-chain test the architecture is designed for.
  2. A whole-repository question. With [1m] on, ask it to trace how a request flows from the entry point to the database. If it holds the thread, the context window is earning its keep.
  3. A screenshot-to-code task. GLM-5.4 adds vision; feed it a UI screenshot and ask for the layout. Compare the result with what your previous model produced from the same image.
  4. A small game or 3D scene from one prompt. Z.ai’s demos lean on this — a complete game, a 3D scene from geometry. One prompt, one build, then play it.
  5. The marathon check. Give it a deliberately simple question at max effort and watch the thinking time. Then repeat at low effort. The gap between the two is your real cost of leaving effort on max — and the reason to set it per job.

GLM-5.4 vs GLM-5.3 at a glance

GLM-5.4 GLM-5.3
Architecture Loop Transformer, 28 layers run twice Standard Transformer
Parameters 750B Not stated in the 5.4 blog
Context window 1M tokens Not stated in the 5.4 blog
Vision Yes, new No
Speed (Z.ai figures) Up to 200 tok/s off-peak, 70–80 tok/s peak Not stated in the 5.4 blog
Weekly quota 50% more than GLM-5.3 for V2/V3/team plans Baseline
Access GLM Coding Plan, ZCode, Z.ai Chat GLM Coding Plan

If you already use GLM-5.3, the upgrade decision is simple: switch when your work needs the million-token window, vision, or the longer reasoning chains. For short edits, GLM-5.3-Flash on the Haiku slot remains the cheaper call.

Frequently Asked Questions

Is GLM-5.4 free to use?

No. GLM-5.4 is available through Z.ai’s GLM Coding Plan, a paid subscription that starts at $18 a month according to Apidog’s reading of the plan overview on 24 November 2026. There is no free tier and no pay-as-you-go API yet — the API is marked coming soon.

Can I use GLM-5.4 in Claude Code without a Z.ai subscription?

No. Claude Code needs a GLM Coding Plan subscription and a Coding Plan API key. A standard Z.ai pay-as-you-go key will not work, and the plan may only be used inside officially supported tools.

What does glm-5.4[1m] mean?

The [1m] suffix switches on the model’s 1-million-token context window in Claude Code. Without it you get the standard context. Pair it with the CLAUDE_CODE_AUTO_COMPACT_WINDOW setting of 1000000 so long sessions compress instead of failing.

Why is GLM-5.4 thinking for so long?

Z.ai says the model can fall into overly long marathon thinking loops, and effort defaults to max in Claude Code. Type /effort in your session and drop to low for quick edits; save max effort for long, multi-step jobs.

Is GLM-5.4 open source?

Not yet. Z.ai says it plans to open-source the model weights responsibly after completing safety hardening. No date has been given, and there is no public API yet either.

Sources and methodology

Sources: Z.ai — “Toward Generalized Coding with Our First Loop Transformer” (GLM-5.4 blog, 23 November 2026); Z.ai docs — “How to Switch Models” (Claude Code, Codex and Cline setup); TechNode — “Zhipu rolls out GLM-5.4 with vision and million-token context” (23 November 2026); Apidog — “How to Use GLM-5.4 in Claude Code and Cursor” (24 November 2026); SSDNODES — “Claude Code with Z.ai’s GLM Coding Plan” (23 November 2026).

Method: every setup step was verified against Z.ai’s own blog and developer docs, read in full on 25 November 2026, with the TechNode launch report and two independent setup guides as cross-checks. Pricing and quota figures are attributed to the source that reported them, and the “2T–3T parameter” comparison is labelled as Z.ai’s claim because no independent GLM-5.4 benchmarks have been published. This guide is desk-researched, not hands-on tested — no Coding Plan subscription was used for this article.

Leave a Reply

Your email address will not be published. Required fields are marked *