Get Started

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.

Subscribe Now
GLM-5.1 coding modelHigh performanceCost effective

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.

Connect welcome dialog

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.

Model selector dropdown

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

Model settings screen

Zhipu BigModel

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

BigModel setup


Zhipu Z.AI

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

Z.AI setup


Anthropic (Claude API)

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

Anthropic setup


OpenRouter

1. Create An API Key

Go to OpenRouter, create an account, and generate an API key.

2. Configure It In Z Code

  1. Open Agents Settings / Models
  2. Click Add Provider at the bottom of the provider list, or select an existing OpenRouter provider
  3. Set the name to OpenRouter
  4. Set the API Base URL to https://openrouter.ai/api
  5. Fill in your API key
  6. Turn on the enable switch to start using it

OpenRouter model list: https://openrouter.ai/models

OpenRouter setup


Moonshot

1. Create An API Key

Go to the KIMI platform and create the corresponding API key.

2. Configure It In Z Code

  1. Open Agents Settings / Models
  2. Click Add Provider at the bottom of the provider list, or select an existing Moonshot provider
  3. Set the name to Moonshot
  4. Set the API Base URL to https://api.moonshot.cn/anthropic
  5. Fill in the API key to use models such as kimi-k2.5 and kimi-k2-turbo-preview

Moonshot setup


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

  1. Open Agents Settings / Models
  2. Click Add Provider at the bottom of the provider list
  3. Set a custom name for the provider, such as claude or deepseek
  4. Choose or enter a Base URL
  5. Enter the API Key
  6. Load models automatically after the endpoint is confirmed
  7. Turn on the enable switch to start using it

Custom provider setup

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.

Next Steps