API Key Setup
Z Code supports the following ways to access AI services:
- Zhipu GLM Coding Plan, BigModel model resource packages, and prepaid balance
- Zhipu Z.AI
- Native subscriptions for Claude Code / Codex / Gemini
- OpenRouter
- Any AI service compatible with the Anthropic / OpenAI protocol, including self-hosted deployments
GLM Coding Plan
Subscribe to GLM Coding Plan to unlock powerful coding models such as GLM-5.1 and get a cost-effective AI coding experience.
API Setup Entry
Method 1: Through Connect
This is best when you want to sign in quickly with an account and start using Z Code immediately. After opening the Z Code desktop app, you will see a welcome dialog.
Click Continue with Z.AI to sign in and enter the workspace. If you do not want to sign in yet, you can also click Skip for now and configure API keys later from the model provider page.

Method 2: Through The Model Selector
After entering Z Code, click the model name inside the chat box to open the model selector dropdown, then click Manage Models at the bottom of the list.

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

Zhipu BigModel
- Open Agents Settings / Models through either method above
- Select BigModel from the provider list on the left
- Turn on the enable switch in the upper-right corner
- Click Get API Key to open the BigModel platform, or click Use Subscription to bind a GLM Coding Plan
- Fill in your API key and start using built-in models such as
glm-5.1,glm-5-turbo, andglm-5

Zhipu Z.AI
- Open Agents Settings / Models
- Select Z.AI from the provider list on the left
- Turn on the enable switch and complete account binding; you need available balance or an active GLM Coding Plan

Anthropic (Claude API)
- Open Agents Settings / Models
- Select Anthropic from the provider list on the left
- Turn on the enable switch in the upper-right corner
- Click Get API Key to open Anthropic and obtain an API key
- Fill in the key to use built-in models such as
claude-sonnet-4.5andclaude-opus-4.5 - You can also add other Anthropic-supported models manually through Add Model

OpenRouter
1. Create An API Key
Go to OpenRouter, create an account, and generate an API key.
2. Configure It In Z Code
- Open Agents Settings / Models
- Click Add Provider at the bottom of the provider list, or select an existing OpenRouter provider
- Set the name to
OpenRouter - Set the API Base URL to
https://openrouter.ai/api - Fill in your API key
- Turn on the enable switch to start using it
OpenRouter model list: https://openrouter.ai/models

Moonshot
1. Create An API Key
Go to the KIMI platform and create the corresponding API key.
2. Configure It In Z Code
- Open Agents Settings / Models
- Click Add Provider at the bottom of the provider list, or select an existing Moonshot provider
- Set the name to
Moonshot - Set the API Base URL to
https://api.moonshot.cn/anthropic - Fill in the API key to use models such as
kimi-k2.5andkimi-k2-turbo-preview

Custom Providers (Anthropic / OpenAI Compatible)
Z Code supports adding any AI service compatible with the Anthropic / OpenAI protocol as a custom provider.
The experience is more complete in the new release. After you choose a known Base URL or enter a compatible API endpoint, Z Code can automatically detect and load the available model list, so you no longer need to type model names one by one.
Setup Steps
- Open Agents Settings / Models
- Click Add Provider at the bottom of the provider list
- Set a custom name for the provider, such as
claudeordeepseek - Choose or enter a Base URL
- Enter the API Key
- Load models automatically after the endpoint is confirmed
- Turn on the enable switch to start using it

For example, using a GLM-compatible endpoint:
- Set the name to
BigModel - Set the Base URL to
https://open.bigmodel.cn/api/anthropic - Fill in the API key
- Add or adjust models if needed
- Save the provider
Verify The Setup
After configuration, select the target model from the model selector in the chat box and test it directly.