API Key Setup
ZCode currently supports three ways to connect model services:
Connect BigModel
Sign in with a Zhipu open platform account, supporting GLM Coding Plan subscriptions, model resource packages, and prepaid balance.
Connect Z.ai
Sign in with a Z.ai account and use the plans and quota in that account directly.
Third-Party Providers
Connect any model service compatible with the Anthropic / OpenAI protocols, including team-managed channels.
Z.ai Coding Plan
Recommended for international users: subscribe to the GLM Coding Plan via Z.ai (USD pricing) to unlock models like GLM-5.2, with a free daily trial quota.
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.
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 both an Anthropic Base URL field and an OpenAI Base URL field. The platform exposes three endpoint types across two protocol families (Anthropic and OpenAI-compatible). Pick the one that matches your account—do not mix them up.
| Endpoint | Protocol | BigModel | Z.ai | Use case |
|---|---|---|---|---|
| Coding Plan only | OpenAI-compatible | https://open.bigmodel.cn/api/coding/paas/v4 | https://api.z.ai/api/coding/paas/v4 | API Keys tied to GLM Coding Plan; coding scenarios only |
| General OpenAI | OpenAI-compatible | https://open.bigmodel.cn/api/paas/v4 | https://api.z.ai/api/paas/v4 | Model resource packages / prepaid balance and other general API usage |
| Anthropic | Anthropic Messages | https://open.bigmodel.cn/api/anthropic | https://api.z.ai/api/anthropic | Call Zhipu / Z.ai models via the Anthropic protocol (ZCode default) |
Important
- For GLM Coding Plan, the OpenAI Base 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 and must not be used for general API calls; the general endpoint cannot replace the Coding endpoint for plan quota either.
- If you bind your account through Coding Plan authorization (not API Key mode), ZCode routes requests automatically—you do not need to fill in these URLs manually.
Quick reference:
- GLM Coding Plan with an API Key → set the OpenAI URL to the Coding-only endpoint
- Resource package / balance via OpenAI protocol → set the OpenAI URL to the general endpoint
.../api/paas/v4 - Resource package / balance via Anthropic protocol → keep the default Anthropic URL
.../api/anthropic(see BigModel / Z.ai API Key setup below)
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 get a trial plan as soon as they connect a BigModel account: no payment required, with a free daily quota for flagship GLM models. The provider page shows today's balance and usage in real time, so you can try first and decide whether to upgrade later.
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.

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.

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.
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.