GLM Coding Plan guide

GLM Coding Plan: run GLM-5.3 inside Claude Code for less

A screenshot-verified walkthrough of z.ai's budget coding subscription: what the Lite, Pro and Max tiers cost in 2026, how to connect them to Claude Code with an API key and a few environment variables, where the usage limits bite, and whether the quality holds up.

TL;DR — the short version

  • The GLM Coding Plan is z.ai's subscription that runs the GLM-5.3 and GLM-5.3-Flash models inside Claude Code and 20+ other coding tools. Plans start at 18 dollars a month, or 12.6 billed yearly.
  • Setup takes about five minutes: subscribe, create a z.ai API key, then either run npx @z_ai/coding-helper or paste a small env block into ~/.claude/settings.json.
  • Every plan pairs a 5-hour rolling window with a weekly credit budget — Lite ships 10,000 credits per week, Pro multiplies that by 6 and Max by 14. Off-peak requests cost half the credits.
  • Verdict: a credible budget alternative to Claude's 100-200 dollar plans for everyday coding. Pair it with the free DeepSeek route on this site and most coding work needs no frontier subscription at all.

Claude Code for $10! (GLM Coding Plan)

Channel:Samuel Gregory12:49

Watch on YouTube

GLM Coding Plan × Claude Code (official integration guide)

Official documentation:Z.AI Developer Documentationdocs.z.ai

Open the docs

Screenshots come from two screen-only reviews (credited below) plus the official z.ai pricing page and documentation, captured September 19, 2026. z.ai reprices this plan often — always confirm current tiers before subscribing.

Frame credits: "Using GLM-5.1 in Claude Code is Ridiculously EASY" by Agentic Hub and "GLM 4.6: The $3/Month Claude Code Killer? (Full Setup & Test)" by Eric Tech, both on YouTube and linked per step. Pricing and docs screenshots are from z.ai's official website.

From subscription to first GLM prompt, step by step

1 · Pick a plan and get your API key

  1. 1

    Compare the Lite, Pro and Max tiers

    Open z.ai's subscription page and pick a billing cycle: monthly, quarterly (20 percent off) or yearly (30 percent off). Lite targets light daily use with 10,000 weekly credits, Pro multiplies usage by six for mid-sized repos, and Max by fourteen for power users. The screenshot shows the official page as of September 2026.

    GLM Coding Plan pricing page showing Lite at 12.6 dollars per month with 10,000 weekly credits, Pro at 56 dollars, and Max at 117.6 dollars on yearly billing
    Official GLM Coding Plan pricing tiers on z.ai — captured September 2026
  2. 2

    Subscribe and confirm the plan is active

    After checkout, the z.ai console lists your plan under API Management → Subscription with its auto-renew date and the tools it covers. The GLM Coding Plan is not pay-as-you-go API credit — this subscription card is what Claude Code will authenticate against.

    z.ai console Subscription page showing an active GLM Coding Lite-Monthly plan with its auto-renew date and the coding tools it covers
    The Subscription tab confirms the active GLM Coding plan and its renewal dateWatch at 3:38
  3. 3

    Create a dedicated API key

    Go to API Management → API Keys and click Create a new API key. Give it a recognizable name such as claude-code so its usage is easy to audit, then confirm. You must be subscribed to a plan for the key to carry the coding-quota benefits.

    Create new API key dialog on the z.ai API Management page where a custom key name is typed before confirming
    Name the key before confirming — one key per tool keeps usage auditableWatch at 3:46
  4. 4

    Copy the key once, store it safely

    The new key appears in the API keys table with its masked secret, creation time and last-used columns. Copy the full value now — you will paste it into Claude Code's settings in a moment, and the console only shows the masked form afterwards.

    z.ai API keys table showing the newly created key row with its masked secret, creation time, and last-used columns
    The API keys table after creation — copy the secret before closing the dialogWatch at 1:32

2 · Point Claude Code at the GLM endpoint

  1. 5

    Find Claude Code's settings folder

    Claude Code keeps its configuration in a .claude folder inside your user profile — C:\Users\<you>\.claude on Windows or ~/.claude on macOS and Linux. The file you need is settings.json; create it if it does not exist yet.

    Windows File Explorer highlighting the .claude folder inside the user profile where Claude Code stores its settings.json
    The .claude folder inside the user profile holds settings.jsonWatch at 0:24
  2. 6

    Paste the GLM env block into settings.json

    Add an env object with ANTHROPIC_BASE_URL set to https://api.z.ai/api/anthropic and ANTHROPIC_AUTH_TOKEN set to your z.ai key, plus API_TIMEOUT_MS of 3000000. This redirects Claude Code's Anthropic-protocol requests to z.ai, where your subscription quota is consumed instead of Anthropic credits.

    Claude Code settings.json opened in Notepad with the GLM env block holding the ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN values
    The two required env vars: ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKENWatch at 0:40
  3. 7

    Map Opus, Sonnet and Haiku to GLM models

    Claude Code internally requests opus, sonnet and haiku slots. Map them with ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL — the official docs currently suggest glm-5.3 for Opus and Sonnet and glm-5.3-flash[1m] for Haiku, with CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC set to 1.

    VS Code editing the settings.json model-mapping env vars that point Claude Code Opus, Sonnet, and Haiku slots at GLM model IDs
    Model-mapping env vars route Claude Code's internal model slots to GLMWatch at 2:50
  4. 8

    Follow the official doc when model versions change

    z.ai keeps a "Switching Models in Claude Code" guide that lists the exact model IDs of the day and the default configuration. When GLM ships a new flagship, you only update the three model-mapping values rather than redoing the whole setup.

    z.ai developer docs guide for switching models in Claude Code with the default ANTHROPIC model environment variables listed
    z.ai's docs list the current model IDs for Claude Code's default configurationWatch at 1:00
  5. 9

    Shortcut: let the Coding Tool Helper configure everything

    Prefer not to hand-edit JSON? Run npx @z_ai/coding-helper (needs Node.js 18+). The wizard asks for your language, plan, API key and target tools, then writes the same settings and can register MCP servers for you. Claude Code, Codex, OpenCode, Crush and Factory Droid are supported.

    z.ai Coding Tool Helper documentation showing the npx @z_ai/coding-helper command and the wizard flow that loads the GLM Coding Plan into coding tools
    Official npx @z_ai/coding-helper wizard — the automated alternative to manual editing
  6. 10

    Launch Claude Code against the GLM endpoint

    Open a NEW terminal (old windows keep stale env), cd into your project, and start claude. For a one-off session you can also inject the variables inline: ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic ANTHROPIC_AUTH_TOKEN=your-key claude — nothing gets written to disk that way.

    Terminal launching Claude Code with ANTHROPIC_BASE_URL pointed at the z.ai Anthropic endpoint and an ANTHROPIC_AUTH_TOKEN set inline
    Inline env vars launch a one-off GLM session without touching settings.jsonWatch at 3:30

3 · First run, real tasks and usage checks

  1. 11

    Confirm GLM is active on the welcome banner

    Claude Code's start screen shows which model is in use and the billing mode — a GLM build with API Usage Billing means your env block won. If Claude Code asks "Do you want to use this API key", answer yes.

    Claude Code welcome banner in the terminal showing the GLM model in use with API Usage Billing mode after the settings change
    The banner names the active GLM build and the API Usage Billing modeWatch at 2:08
  2. 12

    Send a cheap smoke-test prompt

    Type hi and check that the reply arrives in Claude Code's usual formatting. Tools, slash commands and permission prompts behave exactly as on the official plan — only the model behind them has changed.

    Claude Code answering a simple hi prompt through the GLM model while bypass-permissions mode stays enabled
    First response from GLM inside Claude Code — same interface, different engineWatch at 5:06
  3. 13

    Run a real task end to end

    Now give it real work — scaffold an interface, run /init on a repo, refactor a module. Long-horizon agentic coding is exactly what GLM-5.3 is tuned for, and weekly credits are what you are spending, so watch your first big task closely to gauge the burn rate.

    Claude Code starting a create a professional web interface request on the GLM model with the Pouncing working indicator visible
    A real request running on GLM — note the working indicator while it codesWatch at 2:24
  4. 14

    Use plan mode before big builds

    For larger features, let the model plan first: it produces a phased checklist (foundation, core components, interface, testing) that you can approve or trim before a single credit is spent on code. Planning passes are far cheaper than regenerating a wrong implementation.

    GLM implementation plan inside Claude Code listing four phases from project foundation setup to integration testing for a transcription CLI
    GLM's phased implementation plan rendered inside Claude CodeWatch at 6:02
  5. 15

    Know where usage shows up — and where it doesn't

    Anthropic's own console shows zero usage because your requests never touch Anthropic billing. Quota lives in the z.ai console, metered in credits against your plan's weekly budget with a 5-hour rolling window on top. If a session dies mid-task, you probably hit the 5-hour wall, not a bug.

    Anthropic Console usage page showing no data while Claude Code runs on the GLM Coding Plan because requests bill to the z.ai subscription instead
    Anthropic Console stays empty on the GLM plan — quota is metered by z.aiWatch at 4:24

GLM Coding Plan tiers at a glance (September 2026)

PlanList priceUsage allowanceBest for
Lite$18 / month ($12.6 on yearly)10,000 credits per weekLight daily use, learning, small repos
Pro$80 / month ($56 on yearly)6x Lite usage, priority access to new models, faster generationDay-to-day development on mid-sized repos
Max$168 / month ($117.6 on yearly)14x Lite usage, dedicated resources at peak timesAdvanced users on mid-to-large repos

Quarterly billing saves 20 percent and yearly 30 percent versus list price. Every tier can run GLM-5.3 and GLM-5.3-Flash, and requests for older GLM versions are auto-routed to the newest one. Prices change often — verify on z.ai.

GLM Coding Plan FAQ

Keep exploring