Skip to content

GLM Coding Plan Setup: $18/mo Claude Code Replacement

Set up the GLM Coding Plan as a cheap Claude Code backend from $18/month. Plan tiers, 5-hour usage windows, Claude Code config, and how to get more from it.

MGMCSA Guru Team July 2, 2026 4 min read
The GLM Coding Plan configured as a Claude Code backend on Windows

If you use Claude Code daily and the Anthropic bill stings, the GLM Coding Plan is one of the cheapest flat-rate replacements going — starting at $18/month and built specifically to work with Claude Code, Cline, and similar tools. You get a predictable subscription instead of a metered bill, with no proxy to run.

This covers the plan tiers, the setup, and the one thing that catches people out: the rolling usage window. For the quick model setup, see run GLM-5 with Claude Code.

The plan snapshot below was checked against Z.AI’s official docs on June 9, 2026.

What the plan is

The GLM Coding Plan is Z.AI’s flat subscription for AI coding. Instead of paying per token, you pay a monthly fee for access to GLM models across the popular coding tools. It’s the closest thing to a drop-in, cheaper alternative to Anthropic’s own Claude subscription.

GLM Coding Plan shape

Starting price $18/month entry price in Z.AI's Coding Plan docs
Lite window Up to about 80 prompts per 5 hours and 400 per week
Pro window Up to about 400 prompts per 5 hours and 2,000 per week
Max window Up to about 1,600 prompts per 5 hours and 8,000 per week
Included models GLM-5.1, GLM-5-Turbo, GLM-4.7, GLM-4.5-Air
Works with Claude Code, Cline, OpenCode, Kilo Code, and more

Setting it up with Claude Code

The plan uses Z.AI’s Anthropic-compatible endpoint, so Claude Code needs no proxy:

export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="your-zai-plan-key"
export ANTHROPIC_MODEL="glm-5-turbo"
claude

Use a model your plan supports. Z.AI currently lists GLM-5.1, GLM-5-Turbo, GLM-4.7, and GLM-4.5-Air across the plan, with advanced models consuming more quota during peak windows. On Windows, set these in PowerShell with $env: or, better, in a WSL shell profile. Full walkthrough: run GLM-5 with Claude Code.

The 5-hour window (don’t skip this)

This is the most important practical detail. Before subscribing, match your tier to how you actually work:

  • Steady, all-day coding fits the windows well — you rarely spike past the cap.
  • Occasional huge bursts (a marathon refactor session) can hit the limit; a higher tier raises it.

Plan vs pay-per-token

The plan wins for heavy, consistent use; pay-per-token wins for light or bursty use. If your monthly token spend would exceed the plan price, subscribe. For a quick rule of thumb, see coding plans vs pay-per-token.

Getting more from the plan

  • Default to GLM-4.7 or GLM-5-Turbo for routine work; reserve GLM-5.1 for harder tasks because it can consume more quota.
  • Use Plan-style review in your tool so a cheaper model doesn’t waste prompts on wrong directions.
  • Keep a pay-per-token key as overflow for when you hit the window and can’t wait.

GLM Coding Plan checklist

  • Subscribe to a tier that matches your workload
  • Point Claude Code at the /anthropic endpoint with your plan key
  • Set ANTHROPIC_MODEL to an included model
  • Know your tier's rolling-window cap
  • Keep a PAYG key for overflow if needed

Wrapping up

The GLM Coding Plan turns Claude Code into a flat $18/month-and-up tool instead of a metered one: subscribe, point Claude Code at Z.AI’s /anthropic endpoint with your plan key, and use a supported GLM model. The catch to plan around is the rolling usage window — pick a tier that fits your bursts, keep routine work on a cheaper quota path, and keep a PAYG key for overflow.

For model choice, see GLM-4.6 vs GLM-5 vs GLM-5-Turbo; to use GLM in an editor, see GLM + Cline.

Frequently asked questions

How much is the GLM Coding Plan?

The current Z.AI docs describe the GLM Coding Plan as starting at $18/month, with higher Pro and Max tiers for larger 5-hour and weekly prompt windows.

Does the GLM Coding Plan work with Claude Code?

Yes. It's designed to work with Claude Code and other tools like Cline and Kilo Code. You point Claude Code at Z.AI's Anthropic-compatible endpoint with your plan key — no proxy needed.

What are the usage limits?

Z.AI lists estimated limits of about 80 prompts per 5 hours / 400 per week on Lite, 400 / 2,000 on Pro, and 1,600 / 8,000 on Max. Actual consumption depends on project complexity and model choice.

Which models are included?

Z.AI's current Coding Plan overview says all plans support GLM-5.1, GLM-5-Turbo, GLM-4.7, and GLM-4.5-Air. Advanced models consume more quota during peak windows.

Is the plan cheaper than pay-per-token?

For heavy daily coding, almost always — a flat fee beats metered tokens once you're using it a lot. For light use, pay-per-token is cheaper. Estimate your monthly volume to decide.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.