API Key Configuration
Z Code supports the following ways to access AI services:
- Zhipu GLM Coding Plan, Zhipu Open Platform resource packs & top-up balance
- Zhipu Z.AI
- Claude Code / Codex / Gemini native subscription plans
- OpenRouter platform
- Any AI service compatible with Anthropic / OpenAI protocols, including locally deployed AI services.
GLM Coding Plan
Subscribe to GLM Coding Plan to unlock powerful coding models like GLM-5 and enjoy a cost-effective AI coding experience.
Configuration Entry Points
Option 1: Via Connect
Suitable for directly connecting to the official Zhipu API or GLM Coding Plan. Open the Z Code desktop app and click the "Connect" button on the welcome page.

On the setup page, choose "Continue with Z.ai" or "Continue with Bigmodel.cn" to bind your Zhipu account. To connect a third-party AI service, click "Set Your API Key" for manual configuration.

Option 2: Via Model Selector
Once inside Z Code, click the model name in the chat box to open the model selector dropdown, then click "Manage Models" at the bottom of the list.

This opens the Agents Settings / Models configuration panel, where you can manage all AI service providers.

Option 3: Via Settings Icon
You can also click the settings icon in the top-right corner to go directly to the Agents Settings / Models panel (same page as Option 2).

Zhipu BigModel
- Enter the Agents Settings / Models panel via any of the methods above
- Select "BigModel" from the provider list on the left
- Enable the toggle switch in the top-right corner
- Click "Get API Key" to go to the Zhipu Open Platform to obtain your key, or click "Use Subscription" to bind your GLM Coding Plan
- Enter your API key to start using built-in models such as glm-4.7, glm-4.6, and glm-4.5

Zhipu Z.AI
- Enter the Agents Settings / Models panel via any of the methods above
- Select "Z.AI" from the provider list on the left
- Enable the toggle switch and complete account binding. You need to top up or purchase a GLM Coding Plan in advance

Anthropic (Claude API)
- Enter the Agents Settings / Models panel via any of the methods above
- Select "Anthropic" from the provider list on the left
- Enable the toggle switch in the top-right corner
- Click "Get API Key" to go to the Anthropic website to obtain your API key
- After entering your API key, you can use built-in models such as claude-sonnet-4.5, claude-opus-4.5, etc.
- You can also manually add other Anthropic-supported models via "Add Model"

OpenRouter Platform
1. Create API Key
Go to the OpenRouter platform, register an account, and create an API key.
2. Configure in Z Code
- Enter the Agents Settings / Models panel
- Click "Add Provider" at the bottom of the provider list on the left, or select an existing OpenRouter provider
- Set the name to "OpenRouter"
- Set the API Base URL to
https://openrouter.ai/api - Enter your API key
- Enable the toggle switch to start using
OpenRouter platform model name list: https://openrouter.ai/models

Moonshot
1. Create API Key
Go to the KIMI Open Platform, create and copy the corresponding API key.
2. Configure in Z Code
- Enter the Agents Settings / Models panel
- Click "Add Provider" at the bottom of the provider list on the left, or select an existing Moonshot provider
- Set the name to "Moonshot"
- Set the API Base URL to
https://api.moonshot.cn/anthropic - Enter your API key to start using models such as kimi-k2.5 and kimi-k2-turbo-preview

Custom Provider (Anthropic / OpenAI Compatible)
Z Code supports adding any AI service compatible with Anthropic / OpenAI protocols as a custom provider.
Configuration Steps
- Enter the Agents Settings / Models panel
- Click "Add Provider" at the bottom of the provider list on the left
- Set a custom name: Name your provider (e.g., claude, deepseek, etc.)
- Fill in the provider Base URL: Select from the dropdown or manually enter the API Base URL
- Enter API Key: Input the API key for the corresponding service
- Enable the toggle switch, then add the models you want to use via "Add Model"

Example with Deepseek:
- Name: "deepseek"
- Base URL:
https://api.deepseek.com/anthropic - Enter your API key
- Model name: "deepseek-chat"
- Click save to finish
Verify Configuration
After configuration, you can select the corresponding model in the model selector in the chat box to test it.