Subscribe

How do you use GLM-5.4 in Claude Code, and what does the GLM Coding Plan cost?

Last updated

Short answer: GLM-5.4 is Z.ai's newest coding model, and right now the only way to use it in Claude Code is through a paid GLM Coding Plan, because Z.ai lists its regular API as coming soon. The plan costs $18, $80 or $168 a month on monthly billing, and quarterly or yearly billing takes 20% or 30% off. To switch, you point Claude Code at Z.ai's Anthropic-compatible endpoint with your Z.ai key and set the model to glm-5.4[1m]. Those requests use your Z.ai credits rather than your Claude plan, since they never reach Anthropic.

What Z.ai released on November 23, 2026

Z.ai's launch post, dated November 23, 2026, calls GLM-5.4 its first flagship model built on a loop transformer, which means a block of 28 layers from the GLM-5 base model runs twice for each token. Z.ai says this lets a model at the 750B scale reason like a 2T to 3T parameter model, but that is the company's own claim, and the launch post has no head-to-head benchmark table against Claude or GPT models. GLM-5.4 also adds image input, so it can read screenshots. Z.ai product lead Zixuan Li wrote on X that every GLM Coding Plan user has it, and that people on weekly quotas get 50% more quota with GLM-5.4 than they had with GLM-5.3. It is also in ZCode and Z.ai Chat, while the open weights are promised only after what Z.ai calls safety hardening.

What the GLM Coding Plan costs

Z.ai's subscription page lists three individual plans. Lite costs $18 a month, Pro costs $80 and Max costs $168 on monthly billing, and the page offers 20% off for quarterly billing and 30% off for yearly billing, which it shows as $12.60, $56 and $117.60 a month. Pro gives six times the Lite usage, and Max gives fourteen times. Every plan includes GLM-5.4, GLM-5.3 and GLM-5.3-Flash, along with Z.ai's vision, web search, web reader and Zread tools. Pick the billing period carefully, because Z.ai's FAQ says subscriptions can't be refunded once you buy them.

How the limits work

Each plan has a 5-hour credit limit and a weekly one. Lite gets 2,000 credits per 5 hours and 10,000 per week, Pro gets 12,000 and 60,000, and Max gets 28,000 and 140,000. GLM-5.4 burns fewer credits per token than GLM-5.3, and off-peak use costs half the usual credits. Z.ai's peak window is 14:00 to 18:00 Singapore time on weekdays, which by our conversion is 10 PM to 2 AM Pacific, Sunday night through Thursday night. For GLM-5.4 at a 95% cache hit rate, Z.ai estimates 72 to 146 million tokens a week on Lite, 440 to 870 million on Pro and 1,014 to 2,028 million on Max. Separately, from November 24 to December 24, GLM-5.3-Flash costs half its usual credits.

How to switch Claude Code to GLM-5.4

Open ~/.claude/settings.json and add the Z.ai values to its env block rather than replacing the whole file. Set ANTHROPIC_BASE_URL to https://api.z.ai/api/anthropic, put your Z.ai API key in ANTHROPIC_AUTH_TOKEN, and set API_TIMEOUT_MS to 3000000 as Z.ai's guide suggests. Then set ANTHROPIC_DEFAULT_OPUS_MODEL and ANTHROPIC_DEFAULT_SONNET_MODEL to glm-5.4[1m], which turns on the 1M-token context, and add CLAUDE_CODE_AUTO_COMPACT_WINDOW set to 1000000. This step matters because Z.ai's Claude Code guide maps all three model slots to GLM-5.3-Flash by default, so an older setup won't move to GLM-5.4 on its own. Finally, run claude and type /status to confirm that the model reads glm-5.4. If Claude Code says the [1m] model doesn't exist, Z.ai says to update Claude Code first. You can also run npx @z_ai/coding-helper, Z.ai's setup tool, if you'd rather not edit the file by hand.

When GLM-5.4 is the wrong choice

Z.ai's own team warns that GLM-5.4 likes long thinking. Zixuan Li wrote on X that the extra reflection pays off for debugging, big codebases and full test suites, but it is overkill for quick one-liners, so he recommends GLM-5.3-Flash for simpler work. The launch post lists the same limit and calls it a tendency toward marathon thinking loops. Because Claude Code's /effort command defaults to max with this setup, you may want to lower it for small edits.

Rules that can get your plan restricted

The plan works only inside the tools Z.ai supports, a list that includes Claude Code, Codex, OpenCode, Cline and Cursor. Z.ai's terms forbid using the quota as a general API from your own apps, bots or websites, and they forbid sharing an account. If you break those rules, Z.ai says it may rate limit or freeze the account, and it can ban an account after more than three violations. Since October 16, 2026, Coding Plan keys and regular API keys have been managed separately, so make sure the key in Claude Code is the Coding Plan one.

Sources

Free PDF: the AI Coding Cost Cheat Sheet. Enter your email to download it, plus one email a week when picks or prices move.

FAQ

Can I use GLM-5.4 in Claude Code without the GLM Coding Plan?

Not yet. When we checked on November 24, 2026, Z.ai listed its regular model API as coming soon, so GLM-5.4 was available through the Coding Plan, ZCode and Z.ai Chat. The open weights aren't out either.

Does using GLM-5.4 in Claude Code use my Claude Pro or Max limits?

It shouldn't. With ANTHROPIC_BASE_URL pointed at Z.ai, Claude Code sends its requests to Z.ai, so they count against your Z.ai credits. That is our reading of how the base URL setting works, because neither company states it for this exact setup.

How much is the GLM Coding Plan?

Lite is $18 a month, Pro is $80 and Max is $168 on monthly billing. Quarterly billing takes 20% off, and yearly billing takes 30% off, which Z.ai shows as $12.60, $56 and $117.60 a month. Subscriptions can't be refunded.

Why is Claude Code still using GLM-5.3-Flash after I subscribed?

Z.ai's default Claude Code setup maps all three model slots to GLM-5.3-Flash. Change the Opus and Sonnet slots to glm-5.4[1m] in ~/.claude/settings.json, restart Claude Code and check the model with /status.

Is GLM-5.4 better than Claude for coding?

We haven't tested it, and Z.ai's launch post doesn't include a benchmark table against Claude or GPT models. Z.ai says it is a big jump over GLM-5.3 in its internal tests, which is a vendor claim, so try it on your own repository before you pay for a long plan.

Next steps

Spotted an error? Send a correction.

Free: the AI Coding Cost Cheat Sheet (PDF)

What $0, about $20 and $100+ a month gets you across 22 AI coding tools, with prices copied from vendor pages when we wrote it; plans change often, so check each vendor's page before you buy. Enter your email to download it now. You'll also get our free weekly email: what shipped and which picks or prices moved, about a 2-minute read. Unsubscribe anytime.