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.
Recommended for global users
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.
Connect Z.ai
Best for GLM-5.2 coding workflows, a simple account-based setup, and users who already have a GLM Coding Plan.
GLM Coding Plan (BigModel)
For users in China: subscribe via the BigModel open platform for the same GLM Coding Plan with a cost-effective AI coding experience.
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.

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.

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.

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 commonUse the quota from a Coding Plan subscription — coding scenarios only.
BigModel
Z.ai
Resource package / Prepaid balance
General API usage with model resource packages or prepaid balance — the OpenAI Base URL is all you need.
BigModel
Z.ai
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
- Open the Model Settings panel through either method above
- Select BigModel from the provider list on the left
- 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
- 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

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:
| Model | Daily trial quota |
|---|---|
| GLM-5.2 | 3 million tokens / day |
| GLM-5-Turbo | 2 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.

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)
- In the upper-right corner of the BigModel provider page, switch the connection mode to API Key
- Set the OpenAI Base URL to the Coding-only endpoint:
https://open.bigmodel.cn/api/coding/paas/v4 - Fill in the API Key obtained from the Zhipu open platform
- 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
- In the upper-right corner of the BigModel provider page, switch the connection mode to API Key
- 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
- Anthropic (default): keep the Anthropic Base URL as
- Fill in the API Key obtained from the Zhipu open platform
- Available models depend on your account permissions and the provider response; click Add Model to add other available models

Connect Z.ai
Z.ai is the connection option for overseas users, and the setup flow mirrors BigModel:
- Open the Model Settings panel through either method above
- Select Z.ai from the provider list on the left
- Connect your account and turn on the enable switch to use built-in models such as GLM-5.2 and GLM-5-Turbo
- 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:

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.

Connect With an API Key
Choose the setup that matches your account type:
Option A: GLM Coding Plan (Coding Plan API Key)
- In the upper-right corner of the Z.ai provider page, switch the connection mode to API Key
- Set the OpenAI Base URL to the Coding-only endpoint:
https://api.z.ai/api/coding/paas/v4 - Fill in the API Key obtained from the Z.ai platform
- 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
- In the upper-right corner of the Z.ai provider page, switch the connection mode to API Key
- 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
- Anthropic (default): keep the Anthropic Base URL as
- Fill in the API Key obtained from the Z.ai platform
- Available models depend on your account permissions and the provider response; click Add Model to add other available models

Anthropic (Claude API)
- Open the Model Settings panel through either method above
- Click Add Provider at the bottom of the provider list on the left
- Name it "Anthropic"
- Set the Anthropic endpoint to
https://api.anthropic.com - Fill in the API Key obtained from the Anthropic platform, where you can also check usage and plans
- 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 Anthropic-supported models manually

OpenRouter
1. Create an API Key
Go to the OpenRouter platform, register an account, and create an API Key.
2. Configure in ZCode
- Open the Model Settings panel
- Click Add Provider at the bottom of the provider list on the left
- Name it "OpenRouter"
- Set the API base URL to
https://openrouter.ai/api - Fill in the API Key
- Turn on the enable switch to start using it

Moonshot
- Open the Model Settings panel
- Click Add Provider at the bottom of the provider list on the left
- Name it "Moonshot"
- Set the Anthropic endpoint to
https://api.moonshot.cn/anthropic - Get an API Key from the Kimi open platform (token packages and usage are available there) and fill it into the API Key field
- 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

OpenAI
- Open the Model Settings panel
- Click Add Provider at the bottom of the provider list on the left
- Name it "OpenAI"
- Set the API base URL to
https://api.openai.com - Fill in the API Key obtained from the OpenAI platform
- 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

MiniMax
- Open the Model Settings panel
- Click Add Provider at the bottom of the provider list on the left
- Name it "MiniMax"
- Set the Anthropic endpoint to
https://api.minimaxi.com/anthropic - Get an API Key from the MiniMax open platform (plans and billing are available there) and fill it into the API Key field
- 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

Xiaomi MiMo
- Open the Model Settings panel
- Click Add Provider at the bottom of the provider list on the left
- Name it "Xiaomi MiMo"
- Set the API base URL to
https://api.xiaomimimo.com/v1 - Get an API Key from the Xiaomi MiMo open platform (Token Plan packages are available there) and fill it into the API Key field
- 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

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
- Open the Model Settings panel
- Click Add Provider at the bottom of the provider list on the left
- Name the provider (e.g. claude, deepseek)
- Choose the vendor Base URL from the dropdown, or enter the API base URL manually
- Fill in the API Key for the service
- Once the endpoint is confirmed, the system automatically fetches and fills in the available model list
- 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

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.