Get Started

Connect Models & Plans

ZCode supports multiple ways to access GLM models for coding workflows. For global users, we recommend using the Z.ai Coding Plan to run GLM-5.2 in ZCode with a simple account-based setup.

Sign in with your Z.ai account to use GLM models in ZCode. If your account has a GLM Coding Plan, ZCode uses the plan and quota from that account directly.

The GLM Coding Plan has been relaunched. The new plans meter usage in credits and introduce a weekly usage limit; Pro and Max provide 6× and 14× the Lite usage allowance respectively. Once your account has an active plan, ZCode applies its quota directly. For how the new plans differ from legacy ones, see the Coding Plan Revision Notice.

Other ways to connect

Third-Party Providers

Connect compatible model services through the Anthropic / OpenAI protocols, including team-managed channels.

Use API Key

Connect model services with an API key if you manage your own model access.


Setup Entry Points

Method 1: First-Launch Welcome Screen

The first time you open ZCode without any usable model, the welcome screen offers connection options directly:

  • Continue with Z.ai: authorize and sign in with a Z.ai account.
  • Continue with BigModel: authorize and sign in with a Zhipu BigModel account.
  • Use API Key: fill in an API Key directly and go to the model provider settings.

ZCode welcome screen: connect an account

After you choose Continue with Z.ai or Continue with BigModel, ZCode opens the authorization flow and waits for the provider to finish authentication. Once authentication succeeds, the account is bound automatically.

Waiting for BigModel authentication

Method 2: Model Selector

After entering ZCode, click the model name inside the chat box to open the model selector, then click Manage Models at the bottom of the list to open the Settings -> Model Settings panel, where you manage the model channels available to ZCode Agent.

Model selector: Manage Models entry at the bottom


BigModel / Z.ai API Endpoints

After switching BigModel or Z.ai to API Key mode, you will see an OpenAI Base URL and an Anthropic Base URL field. Pick your account type first, then fill in the URLs for the platform you use and add the matching API Key.

GLM Coding Plan

Most common

Use the quota from a Coding Plan subscription — coding scenarios only.

BigModel

OpenAI Base URL
Anthropic Base URL

Z.ai

OpenAI Base URL
Anthropic Base URL

Resource package / Prepaid balance

General API usage with model resource packages or prepaid balance — the OpenAI Base URL is all you need.

BigModel

OpenAI Base URL

Z.ai

OpenAI Base URL
The Anthropic Base URL does not apply to resource packages / prepaid balance: it only draws from your balance if the account has never purchased a Coding Plan. Once a plan has been purchased — whether used up or expired — this route no longer bills against balance and requires manual allowlisting. Use the OpenAI Base URL above instead.

Before you fill in

  • For a Coding Plan, the OpenAI URL must be the Coding-only endpoint (/api/coding/paas/v4), not the general endpoint /api/paas/v4.
  • The Coding endpoint is for coding scenarios only; it and the general endpoint are not interchangeable.
  • If you bind your account through Coding Plan authorization (not API Key mode), ZCode routes requests automatically — no manual setup needed.

Connect BigModel

  1. Open the Model Settings panel through either method above
  2. Select BigModel from the provider list on the left
  3. Connect your account and turn on the enable switch to use built-in models such as GLM-5.2 and GLM-5-Turbo according to your account permissions
  4. Use the switcher in the upper-right corner to choose a connection mode: bind a GLM Coding Plan via Coding Plan, or switch to API Key access

BigModel provider page: the Coding Plan connection entry, with Start Plan at 3M tokens per day, For Individuals from CN¥118, and For Teams from CN¥598

Free Trial Quota

New users automatically receive a trial plan after connecting a BigModel account: no payment required, with 5 million tokens per day for the first 5 days for GLM model trials. This is intended for trying ZCode Agent in real projects before deciding whether to upgrade to a GLM Coding Plan.

Note: the trial lasts 5 days only. The daily quota is granted during these 5 days and expires afterwards — it is not an ongoing daily allowance.

The daily trial quota is split across two model buckets. The provider page shows each model's remaining balance and today's usage in real time:

ModelDaily trial quota
GLM-5.23 million tokens / day
GLM-5-Turbo2 million tokens / day

Quota refreshes daily during the trial period. Available models, remaining balance, and usage are subject to the real-time status shown on the BigModel provider page.

Subscribe to a Coding Plan Inside ZCode

Need more than the trial quota? You don't have to leave ZCode: the BigModel provider page lists the GLM Coding plans (Lite / Pro / Max) with monthly, quarterly, and yearly billing, and you can complete the purchase in-app after signing in. Existing subscribers can also manage their current plan and check quota status here.

The new plans meter usage in credits and add a weekly allowance on top of the 5-hour one; for each tier's exact benefits, credit allowances, and conversion rules, refer to the Coding Plan Revision Notice.

Upgrade Coding Plan dialog: individual plans at Lite CN¥118, Pro CN¥538, and Max CN¥1,078, with team plans at CN¥598 and CN¥1,198

Using a Team Plan

If your team has a GLM Coding Plan team subscription, no extra setup is needed once you sign in: the connection menu on the BigModel provider page lists each team you have access to as its own Team Plan entry, named after the organization. Select one to run tasks against that team's quota. The same menu switches back to your Individual Plan or an API key.

After switching, the quota shown in the sidebar and usage stats follows the selected connection, and quota cards indicate whether they're personal or team.

If a team entry appears but reports that no seat is assigned, your administrator hasn't added you yet — seat management happens on BigModel's team plan page, not in the client, and the page provides a direct link there.

Connect With an API Key

Choose the setup that matches your account type:

Option A: GLM Coding Plan (Coding Plan API Key)

  1. In the upper-right corner of the BigModel provider page, switch the connection mode to API Key
  2. Set the OpenAI Base URL to the Coding-only endpoint: https://open.bigmodel.cn/api/coding/paas/v4
  3. Fill in the API Key obtained from the Zhipu open platform
  4. Available models depend on your account permissions and the model list returned by the provider

Do not replace the Coding endpoint with the general endpoint https://open.bigmodel.cn/api/paas/v4.

Option B: Model resource packages / prepaid balance

  1. In the upper-right corner of the BigModel provider page, switch the connection mode to API Key
  2. Choose one protocol:
    • Anthropic (default): keep the Anthropic Base URL as https://open.bigmodel.cn/api/anthropic
    • OpenAI: set the OpenAI Base URL to https://open.bigmodel.cn/api/paas/v4
  3. Fill in the API Key obtained from the Zhipu open platform
  4. Available models depend on your account permissions and the provider response; click Add Model to add other available models

BigModel API Key connection mode


Connect Z.ai

Z.ai is the connection option for overseas users, and the setup flow mirrors BigModel:

  1. Open the Model Settings panel through either method above
  2. Select Z.ai from the provider list on the left
  3. Connect your account and turn on the enable switch to use built-in models such as GLM-5.2 and GLM-5-Turbo
  4. The switcher in the upper-right corner also toggles between Coding Plan and API Key connection modes

Once connected, the provider page shows your current plan plus today's balance and usage per model:

Z.ai provider: plan and today's balance

Trial Quota and Coding Plans

Just like BigModel, new users get a free daily trial quota for flagship GLM models, and you can browse and subscribe to the GLM Coding plans (Lite / Pro / Max, priced in USD) right on the page, with monthly, quarterly, and yearly billing. The new plans meter usage in credits and include a weekly allowance — see the Coding Plan Revision Notice for details.

Z.ai provider page: Start Plan at 3M tokens per day and For Individuals from US$18.00

Connect With an API Key

Choose the setup that matches your account type:

Option A: GLM Coding Plan (Coding Plan API Key)

  1. In the upper-right corner of the Z.ai provider page, switch the connection mode to API Key
  2. Set the OpenAI Base URL to the Coding-only endpoint: https://api.z.ai/api/coding/paas/v4
  3. Fill in the API Key obtained from the Z.ai platform
  4. Available models depend on your account permissions and the model list returned by the provider

Do not replace the Coding endpoint with the general endpoint https://api.z.ai/api/paas/v4.

Option B: Model resource packages / prepaid balance

  1. In the upper-right corner of the Z.ai provider page, switch the connection mode to API Key
  2. Choose one protocol:
    • Anthropic (default): keep the Anthropic Base URL as https://api.z.ai/api/anthropic
    • OpenAI: set the OpenAI Base URL to https://api.z.ai/api/paas/v4
  3. Fill in the API Key obtained from the Z.ai platform
  4. Available models depend on your account permissions and the provider response; click Add Model to add other available models

Z.ai API Key connection mode


Anthropic (Claude API)

  1. Open the Model Settings panel through either method above
  2. Click Add Provider at the bottom of the provider list on the left
  3. Name it "Anthropic"
  4. Set the Anthropic endpoint to https://api.anthropic.com
  5. Fill in the API Key obtained from the Anthropic platform, where you can also check usage and plans
  6. After saving, ZCode shows models according to the available model list returned by the provider
  7. If models are not loaded automatically, click Add Model to add Anthropic-supported models manually

Anthropic provider settings


OpenRouter

1. Create an API Key

Go to the OpenRouter platform, register an account, and create an API Key.

2. Configure in ZCode

  1. Open the Model Settings panel
  2. Click Add Provider at the bottom of the provider list on the left
  3. Name it "OpenRouter"
  4. Set the API base URL to https://openrouter.ai/api
  5. Fill in the API Key
  6. Turn on the enable switch to start using it

OpenRouter provider settings


Moonshot

  1. Open the Model Settings panel
  2. Click Add Provider at the bottom of the provider list on the left
  3. Name it "Moonshot"
  4. Set the Anthropic endpoint to https://api.moonshot.cn/anthropic
  5. Get an API Key from the Kimi open platform (token packages and usage are available there) and fill it into the API Key field
  6. After saving, ZCode shows models according to the available model list returned by the provider; if models are not loaded automatically, click Add Model to add Moonshot-supported models manually

Moonshot provider settings


OpenAI

  1. Open the Model Settings panel
  2. Click Add Provider at the bottom of the provider list on the left
  3. Name it "OpenAI"
  4. Set the API base URL to https://api.openai.com
  5. Fill in the API Key obtained from the OpenAI platform
  6. After saving, ZCode shows models according to the available model list returned by the provider; if models are not loaded automatically, click Add Model to add OpenAI-supported models manually

OpenAI provider settings


MiniMax

  1. Open the Model Settings panel
  2. Click Add Provider at the bottom of the provider list on the left
  3. Name it "MiniMax"
  4. Set the Anthropic endpoint to https://api.minimaxi.com/anthropic
  5. Get an API Key from the MiniMax open platform (plans and billing are available there) and fill it into the API Key field
  6. After saving, ZCode shows models according to the available model list returned by the provider; if models are not loaded automatically, click Add Model to add MiniMax-supported models manually

MiniMax provider settings


Xiaomi MiMo

  1. Open the Model Settings panel
  2. Click Add Provider at the bottom of the provider list on the left
  3. Name it "Xiaomi MiMo"
  4. Set the API base URL to https://api.xiaomimimo.com/v1
  5. Get an API Key from the Xiaomi MiMo open platform (Token Plan packages are available there) and fill it into the API Key field
  6. After saving, ZCode shows models according to the available model list returned by the provider; if models are not loaded automatically, click Add Model to add Xiaomi MiMo-supported models manually

Xiaomi MiMo provider settings


Custom Providers (Anthropic / OpenAI Compatible)

ZCode can add any model service compatible with the Anthropic / OpenAI protocols as a custom provider — public model services, team-managed enterprise channels, or self-hosted services on a private network.

When you pick a vendor Base URL from the list or enter a compatible endpoint, the system automatically detects it and loads the available model list, so you no longer need to add model names one by one.

Setup Steps

  1. Open the Model Settings panel
  2. Click Add Provider at the bottom of the provider list on the left
  3. Name the provider (e.g. claude, deepseek)
  4. Choose the vendor Base URL from the dropdown, or enter the API base URL manually
  5. Fill in the API Key for the service
  6. Once the endpoint is confirmed, the system automatically fetches and fills in the available model list
  7. Turn on the enable switch to start using it

Taking the DeepSeek-compatible endpoint as an example:

  • Name it "DeepSeek"
  • Set the Anthropic endpoint to https://api.deepseek.com/anthropic
  • Set the OpenAI endpoint to https://api.deepseek.com/v1
  • Fill in the API Key obtained from the DeepSeek open platform
  • Use the actual model list returned by the provider; if needed, manually add model IDs agreed on by your team
  • Click save

Custom provider settings (DeepSeek as an example)

Team usage tip: for enterprise model channels, manage the Base URL, API Key, model list, and access policy at the team level so long-running tasks have a stable and traceable model connection.


Per-Model Advanced Settings

Open a model under Settings → Model Providers and expand Advanced to set Max output tokens for that one model — the length limit for a single reply.

Leave it empty and ZCode uses whatever the model itself supports, which is the right choice almost always. Set it only if you know a particular model handles longer replies than it reports.

One thing to expect if you do raise it: output length and conversation history compete for the same space, so a higher limit means ZCode compacts long conversations sooner.


Verify The Setup

After configuration, choose the channel from the model selector in the chat box and send a short test instruction. Once the model responds reliably, you are ready to go.

Next Steps