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.