GLM Coding Plan: Prices, Quotas and Claude Code Setup
Z.ai's GLM Coding Plan as of December 2026: Lite, Pro and Max prices, credit limits, the GLM-5.4 models, Claude Code and OpenCode setup, and the terms.
The GLM Coding Plan is Z.ai’s subscription for using its GLM models inside coding agents. As of December 1, 2026 it comes in three tiers, Lite at $18 a month, Pro at $72 and Max at $160, each with a 5-hour and a weekly credit limit, and every tier serves GLM-5.4, GLM-5.3 and GLM-5.3-Flash. In Claude Code, set ANTHROPIC_BASE_URL to https://api.z.ai/api/anthropic and ANTHROPIC_AUTH_TOKEN to a Coding Plan key in ~/.claude/settings.json; in OpenCode, run opencode auth login and pick Z.AI Coding Plan. The plan only works in the tools Z.ai lists, may not be shared, and is not refundable.
Plans and prices
Since July 30, 2026 the plan is metered in credits rather than prompts: the plan update notice says “GLM Coding Plan is moving to a credits-based system,” where the old Lite was “Up to approx. 80 prompts” per five hours. Prices as Z.ai’s migration notice gives them, in USD:
| Plan | Monthly | Quarterly | Yearly | 5-hour credits | Weekly credits |
|---|---|---|---|---|---|
Lite | $18 | $48.60 | $172.80 | 2,000 | 10,000 |
Pro | $72 | $194.40 | $691.20 | 12,000 | 60,000 |
Max | $160 | $432 | $1,536 | 28,000 | 140,000 |
The quarterly and yearly figures are the discounted prices for those periods. The credit limits are from the plan overview: the 5-hour credits are “Dynamically refreshed; credit quota resets 5 hours after consumption,” and the weekly ones reset every seven days. Hitting either limit pauses the plan; it never spills onto your account balance, in the FAQ’s words “The system will not deduct from your account balance.” Every tier also includes Z.ai’s vision, web search, web reader and Zread MCP servers.
A Team plan sells seats instead, “A minimum of 2 seats is required”, at 15,000 five-hour and 66,000 weekly credits a Standard seat or 35,000 and 155,000 a Premium seat (Team Plan benefits; the docs give no per-seat price). If you held a prompt-based plan, it runs to the end of its billing cycle unchanged, and you move over when it expires or, on the V2 legacy plan, when you upgrade a tier.
How credits are spent
A model call costs credits by a formula on the overview page:
Model credit usage = (Input tokens × Input multiplier + Cached Input tokens × Cached Input multiplier + Output tokens × Output multiplier) / 10,000Copied| Model | Input | Cached input | Output |
|---|---|---|---|
GLM-5.4 | 4.6 | 1.1 | 16 |
GLM-5.3 | 6.9 | 1.7 | 24 |
GLM-5.3-Flash | 1.15 | 0.28 | 4 |
Two things follow. The newest model, GLM-5.4, costs fewer credits per token than GLM-5.3, so there is no quota reason to stay on the older one. And cached input is about a quarter of the price of fresh input, which matters because an agent resends its whole conversation on every turn. As arithmetic only: a GLM-5.4 turn that reads 50,000 cached tokens and 2,000 new ones and writes 1,000 costs (2,000 × 4.6 + 50,000 × 1.1 + 1,000 × 16) / 10,000, about 8 credits, so Lite’s 2,000 five-hour credits cover roughly 250 such turns at full rate.
Time of day changes the rate. “During off-peak hours, model usage is charged at 50% of the standard credit rate.” Peak is Monday to Friday, 14:00 to 18:00 in UTC+8 (06:00 to 10:00 UTC), and weekends are off-peak all day. As the overview read on December 1, 2026, GLM-5.3-Flash is also charged at half its rate from November 24 to December 24, an offer the page gives no year for. The web search, web reader and Zread tools cost 1.2 credits a call. Z.ai’s own estimate of what a week buys on GLM-5.4, at a 95% cache hit rate, is 72 to 146 million tokens on Lite, 440 to 870 million on Pro and 1,014 to 2,028 million on Max, the low end all at peak and the high end all off-peak.
Models
“All plans support GLM-5.4, GLM-5.3 and GLM-5.3-Flash,” and Z.ai’s model switching page says the plan “now supports the latest GLM-5.4 model for all users (Max, Pro, and Lite).” GLM-5.4 has a 1M-token context, written glm-5.4[1m] in Claude Code. Asking for any other model is the usual cause of the error people meet right after paying: Z.ai’s FAQ says a 1113 Insufficient Balance after buying the plan usually means an unsupported tool, the wrong base URL, or a model other than those three.
Getting a key
Sign in at z.ai/model-api, subscribe at z.ai/subscribe, then create the key under Personal Coding Plan (z.ai/manage-apikey/apikey-list) or, for a Team seat, Team Coding Plan › My Plan. Coding Plan keys, Team keys and ordinary API keys are separate and, in the quick start’s words, “not interchangeable”. For keys created from October 16, 2026, Z.ai’s key notice says “the key type determines how calls are billed,” so a call only draws on the plan when it carries a Coding Plan key.
| Endpoint | Use it for |
|---|---|
https://api.z.ai/api/anthropic | Anthropic Messages: Claude Code, Goose |
https://api.z.ai/api/coding/paas/v4 | OpenAI Chat Completions: OpenCode, Cline and most others |
https://api.z.ai/api/v1 | OpenAI Responses |
Set it up in Claude Code
Z.ai’s Claude Code page offers a helper, npx @z_ai/coding-helper, that installs tools and writes the configuration, and a macOS and Linux script that does the same. The manual route is a few lines in ~/.claude/settings.json (on Windows, %USERPROFILE%\.claude\settings.json). Add them to the env block rather than replacing the file. These are from Z.ai’s manual configuration, with the model slots as its model switching page sets them:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "<your Coding Plan API key>",
"ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
"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",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "1000000",
"API_TIMEOUT_MS": "3000000"
}
}CopiedThe key sits in that file in plain text, so keep the file out of any repository and make it readable only by you:
chmod 600 ~/.claude/settings.jsonCopiedZ.ai’s pages disagree on the model slots. The Claude Code page lists its default mapping as GLM-5.3-Flash in all three slots, while its own manual example puts glm-5.4[1m] in Opus and Sonnet and glm-5.3-flash[1m] in Haiku, and the model switching page puts glm-5.4[1m] in all three. Since GLM-5.4 also spends fewer credits than GLM-5.3, the block above follows the switching page; set Haiku to glm-5.3-flash[1m] if you want that slot on the cheapest model. Z.ai’s manual example also sets DISABLE_TELEMETRY, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC and CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT; the Claude Code environment variables guide explains what each one does.
Open a new terminal (“A new window is required for the changes to take effect”), start claude, and run /status: the model should read glm-5.4 or glm-5.4[1m]. For coding, Z.ai recommends switching /effort to max. If edits seem ignored, the troubleshooting on Z.ai’s Claude Code page says to close every Claude Code window and start again from a new terminal, and to check the JSON for a missing or extra comma. If you set ANTHROPIC_* variables for Claude Code elsewhere before, such as in a shell profile, remove the old values so only one configuration remains. How Claude Code picks a model for each slot is in Claude Code models.
Set it up in OpenCode
Sign in first:
opencode auth loginCopiedAt the provider prompt choose Z.AI Coding Plan and paste the key. Then start OpenCode and run /models to pick a GLM model:
opencodeCopiedThe list has two Z.ai entries. Z.AI Coding Plan is the subscription; plain Z.AI is the pay-as-you-go API, with its own endpoint, so pick the Coding Plan entry. Inside OpenCode, /connect does the same as auth login. A key entered this way is stored in OpenCode’s own database (usually ~/.local/share/opencode/opencode.db), not in a file you edit. For a server or a script, OpenCode’s catalogue gives the provider the ID zai-coding-plan and reads the key from ZHIPU_API_KEY, so a model is named zai-coding-plan/glm-5.4. Exporting the key from a shell profile leaves it readable by anyone who can read that file, so chmod 600 it too. The OpenCode models guide covers choosing a default, and OpenCode’s config file how to set it there.
Other agents
Z.ai’s tool list names the coding agents the plan covers: ZCode (its own), Claude Code, Claude for IDE, Codex, OpenCode, Pi, Cursor, Cline, TRAE, Qoder, Droid, Kilo Code, Roo Code, Crush, Goose and Eigent. A second group, AutoClaw, OpenClaw, Hermes Agent and SillyTavern, is supported on a best-effort basis. Anything off the list is outside the plan.
Terms that limit how you use it
The usage policy is short, and these lines are the ones to read before you build anything around the plan:
- “GLM Coding Plan may only be used within officially supported tools and products.” The FAQ adds: “API calls outside the plan are not available.” A script calling the endpoint directly needs a pay-as-you-go key.
- “Account sharing or multi-user access is prohibited.” A team buys Team seats, one per person.
- “Rate (concurrency) limits are tied to your plan tier,” higher on Pro than Lite and on Max than Pro.
- “Violations of the Usage Rules may trigger risk control measures, including rate limiting, account freezing, or other restrictions,” and “Accounts with more than three violations may be banned.”
- No refunds once bought. Plans renew automatically; the usage policy says to cancel “at least 3 days before the next billing date,” while the FAQ says at least 24 hours. An upgrade to a higher tier takes effect at once, with the unused part of the old plan credited to your balance.
The policy names tools, not modes of use: it says nothing either way about running a supported agent headless or on a schedule, and no Z.ai page states a regional restriction.
The China site
In mainland China the same plan is sold on BigModel (bigmodel.cn), with the same three tiers, the same credit limits and the same models. The Claude Code base URL there is https://open.bigmodel.cn/api/anthropic, and keys come from BigModel’s own console. Its docs give no prices. Z.ai’s plan is one of several model makers’ coding subscriptions that plug into Claude Code this way; Moonshot’s is covered in the Kimi Code guide.