Featured image for How to Use Z.ai (GLM): Sign-Up, Plan and First Prompt

How to Use Z.ai (GLM): Sign-Up, Plan and First Prompt

Published on:

Reading time: 5 min

Topic: Technology

Author: Leandro Valencia

#zai#glm#glm coding plan#claude code#cline#api key#ai coding

Guide to signing up for Z.ai, activating the GLM Coding Plan, creating your API key and connecting Claude Code, Cline or OpenCode. Onboarding, not a review.

Table of Contents

What you're activating, in one sentence

The GLM Coding Plan is a Z.ai subscription that gives you quota to use GLM models inside coding tools. It's not a chat with a pretty face. It's an API key you plug into Claude Code, Cline, OpenCode, Roo, Kilo and similar tools.

All tiers (Lite, Pro, Max) use the same models. What changes is how much quota you get. That's why the correct onboarding is: account → Lite monthly → key → one single tool → one real prompt. Scaling the plan is a month-2 problem.

Step by step

1. Create your Z.ai account

Go to z.ai/subscribe with the invitation code and sign up. Complete the login. The first-order discount is tied to that account: don't create one, browse prices with another and pay with a third.

If the site asks for a region, use the international one (z.ai), not the mainland China portal, unless that's your case.

2. Choose the GLM Coding Plan

On the plans screen you'll see Lite / Pro / Max, and monthly / quarterly / annual cycles.

Practical rule, the same one I wrote in the review:

  • Start on Lite monthly.
  • Subscriptions are non-refundable once purchased.
  • Don't marry Max annual on day one. The big number feels like "savings"; it's a commitment.

The link's 10% applies to the first payment, not for the life of the plan. Confirm the total at checkout before paying: Pro and Max have varied in amount between promotions.

3. Create an API key

Once the payment goes through, enter the dashboard (API Keys / Billing — the tab's exact name changes with redesigns, the concept doesn't):

  1. Create a key for the Coding Plan, not a loose pay-as-you-go key if what you paid for is the subscription. Z.ai warns that the wrong endpoint doesn't draw down the plan's quota.
  2. Copy it once. Treat it like a password.
  3. Don't push it to a repo, don't paste it into a Discord, don't leave it in a Twitter screenshot.

If you rotate the key later, you update the tool; there's no need to pay for the plan again.

4. Connect your tool

You have three paths. Pick one, not all three on the same day.

Official shortcut: in the terminal,

npx @z_ai/coding-helper

Z.ai's helper walks you through installing/configuring the tool and the plan.

If you already use Claude Code: Z.ai documents the Anthropic-compatible endpoint. The idea is to point Claude Code at Z.ai (base URL https://api.z.ai/api/anthropic) and use your API key as the token. The current details are in Z.ai's Claude Code doc; if you copy a 2024 tutorial with a different URL, you'll burn quota in the wrong place or burn nothing at all.

If you live in VS Code / Cline: API Provider → OpenAI Compatible (or the "Z AI" provider if it shows up), Base URL https://api.z.ai/api/coding/paas/v4, your API key, a GLM model (for example the flagship active on your plan). Again: the Cline doc beats any old screenshot.

OpenCode, Roo and the rest follow the same pattern: coding endpoint + plan key. If you pick the generic chat endpoint by mistake, the symptom is "it works but it doesn't draw down my Lite" or "it doesn't work and I don't know why".

5. Send the first prompt

Open a real repository (even a small one). Ask for something you can verify in a minute: "explain this file", "write the missing test for this function". If the tool responds with the GLM model, the wiring is right.

Don't start with a 40-file refactor. The first prompt is a ping, not a migration.

Once that works, only then is it worth going back to the daily-use review and deciding whether Lite is enough for you or the 5-hour ceiling feels tight.

Three things that are not onboarding (and that's why they're not here)

  • Price and token tables: they're already in the two previous posts.
  • "Does GLM beat Claude?": that's opinion, not a step.
  • Configuring 20 tools at once: the plan is one; the bottleneck is you.

Frequently asked questions

Is Z.ai the same as the glm.ai chat?

The Coding Plan is the subscription for coding tools. That's what this post covers.

Is the 10% discount applied every time?

First order only, and only if you've never paid for a subscription on the platform.

Which plan should I start with?

Lite monthly. Same models, less quota, less regret.

Do I have to use Claude Code?

No. npx @z_ai/coding-helper, Cline or OpenCode work. One well-connected tool beats five half-set-up ones.

In short

  • Account on z.ai with the invitation link.
  • Lite monthly. Not Max annual on day one.
  • API key for the Coding Plan, coding endpoint.
  • One prompt in a real repo.
  • The prices and the "who it's for" live in the opinion posts.

👉 Activate the GLM Coding Plan with 10% off your first order


If you already pay for a coding agent and want to try GLM without rewriting your workflow, the job isn't "learning another chat". It's pasting a key into the tool you already open every day.

— Leandro Valencia

Step-by-step guide

  1. Create your Z.ai account

    Sign up at z.ai and log in. The first-order discount is tied to that account.

  2. Choose the GLM Coding Plan

    Start on Lite monthly. Subscriptions are non-refundable; don't start on Max annual.

  3. Create an API key

    In the dashboard, generate a coding plan key and copy it. Don't commit it to git.

  4. Connect your tool

    Use coding-helper, Claude Code, Cline or OpenCode with the Z.ai endpoint.

  5. Send the first prompt

    Open a real repo and ask for a small task. If it responds, the plan is live.

Frequently asked questions

Is Z.ai the same as the glm.ai chat?

Z.ai is the international gateway to the GLM models (Zhipu). The GLM Coding Plan is the subscription designed for coding tools (Claude Code, Cline, OpenCode and others), not the standalone chat. This post covers that plan.

Is the 10% discount applied every time?

No. With the invitation link it applies to the first order, and only if you've never had a paid subscription on the platform. If you've paid at any point before, don't expect it.

Which plan should I start with?

Lite monthly. All Coding Plan tiers give access to the same models; only the quota changes. I detail it in the three-month review. Lite monthly is reversible in the sense that you aren't married to an annual plan: subscriptions, once purchased, are non-refundable.

Do I have to use Claude Code?

No. Z.ai documents Claude Code, Cline, OpenCode and more than 20 tools. The official shortcut is `npx @z_ai/coding-helper`, which walks you through it. If you already live in Cline or the terminal, configure that one.

Related Posts

Keep exploring similar content that may interest you

Partnerships

Tools I use every day, on better terms for this community.

Affiliate links. Your price does not change.See all partnerships
Training program

Ready to turn your idea into a real project?

Transforma is the program where you will learn to create, execute and scale your project with clarity and method.

Discover the Transforma Program