Official docs + CLI test · as of 2026-11-10

ZCode custom provider: your own model API for Claude, GPT and Chinese models (November 2026)

Yes. As of 2026-11-10, ZCode's official Connect Models page says you can add a custom provider compatible with the Anthropic / OpenAI protocols: in the desktop app, click Manage Models at the bottom of the model picker to open Settings -> Model Settings, click Add Provider at the bottom of the provider list, enter the endpoint and API key, then add model IDs with Add Model. Tested with ZCode CLI 0.17.1, all three QCode protocols work without signing in to a Z.ai or BigModel account: the Anthropic base URL is https://api.qcode.cc/api, OpenAI Chat and Responses both use https://api.qcode.cc/openai/v1, and the key is your cr_ QCode key.

Updated 2026-11-10

Point this tool at the QCode endpoint — one key for Claude, GPT and Chinese models.

#ZCode custom provider#Anthropic / OpenAI protocols#Add Provider#Tested on CLI 0.17.1

Four key points: official docs and the 2026-11-10 test

3 protocols

All pass on CLI 0.17.1

As of 2026-11-10, tested with ZCode CLI 0.17.1: anthropic-messages with https://api.qcode.cc/api (claude-haiku-5-5), and openai-chat-completions and openai-responses both with https://api.qcode.cc/openai/v1 (deepseek-v4-flash, gpt-6.1-terra). All three returned a reply without signing in to a Z.ai or BigModel account.

/api

No /v1 on the Anthropic URL

In ZCode's source, an Anthropic base URL that does not end in /v1 gets /v1 appended, and the SDK then adds /messages, so https://api.qcode.cc/api requests /api/v1/messages. OpenAI Chat and Responses append /chat/completions or /responses directly, so they take https://api.qcode.cc/openai/v1.

2 files

Desktop and CLI use different config files

The desktop app keeps providers in ~/.zcode/v2/config.json, with baseURL under a provider's options. The CLI reads ~/.zcode/v2/provider_config.json (not config.json) and uses api.type and api.baseUrl; the official CLI docs note that api.baseUrl is spelled differently from the old options.baseURL.

v3.17.2

Latest version as of 2026-11-10

The newest GitHub release is v3.17.2: the README and changelog date it 2026-11-03, and the release was published on 2026-11-04 (UTC). The zai-org/ZCode repository is licensed under the Apache License 2.0, and a CLI built from its source reports version 0.17.1.

What is ZCode, and can it use your own API key?

Yes. As of 2026-11-10, ZCode's official Connect Models page says it can add any model service compatible with the Anthropic / OpenAI protocols as a custom provider, including public services, team-managed channels and self-hosted services on a private network. ZCode is an open-source AI coding workspace from Z.ai (Zhipu): the official FAQ calls it a new Agentic Development Environment (ADE) centered on the first-party ZCode Agent, and the README describes it as "an AI coding workspace with desktop, browser, and terminal interfaces". The desktop app supports macOS (Apple Silicon / Intel), Windows (x64 / ARM64) and Linux (AppImage, DEB, RPM); the command-line build starts with zcode, zcode --web starts the Web interface, and the repository docs build the CLI from source. The official page lists three ways to get a model: sign in with a Z.ai or BigModel account and use its GLM Coding Plan quota directly; switch the Z.ai / BigModel page to API Key mode and enter a key from that platform; or add a custom provider, where usage is counted by the service you point it at. QCode uses the third way.

v3.17.2: the latest version as of 2026-11-10

As of 2026-11-10, the newest release on GitHub is v3.17.2: the README and changelog date it 2026-11-03, and the GitHub release was published on 2026-11-04 (UTC). The changelog for this version says corrupted configuration files are no longer overwritten, preventing data loss. A CLI built from the main branch of the repository reports version 0.17.1, a different number from the desktop version; that CLI is the build used in the 2026-11-10 QCode test.

Timeline

2026-09-20

The zai-org/ZCode repository is created on GitHub.

2026-11-03

v3.17.2 is released (the date in the README and changelog; the GitHub release was published on 2026-11-04 UTC).

2026-11-10

Checked the official docs, README and Releases; v3.17.2 is still the latest. Tested with ZCode CLI 0.17.1, QCode's Anthropic, OpenAI Chat and Responses protocols all work.

What the ZCode docs state, and what the test and source code answer

Documented by ZCode

① Adding a custom provider in the desktop app: open Settings -> Model Settings, click Add Provider at the bottom of the provider list, name it, enter the endpoint and API key, add model IDs by hand with Add Model, and turn on the enable switch. ② The official DeepSeek example: Anthropic endpoint https://api.deepseek.com/anthropic and OpenAI endpoint https://api.deepseek.com/v1. ③ In the desktop file ~/.zcode/v2/config.json, a provider's options only recognizes connection settings such as apiKey, baseURL, apiKeyRequired and headers; other keys added by hand are silently ignored and never written into the request body. ④ The repository's CLI docs: personal providers live in ~/.zcode/v2/provider_config.json, the API types are openai-chat-completions, openai-responses and anthropic-messages, and api.baseUrl is spelled differently from the old options.baseURL. ⑤ The same CLI docs say that file holds the key in plain text, so restrict its permissions and keep it out of Git. ⑥ Some third-party deployments only accept up to xhigh, so the top thinking level returns a 400 parameter error; picking high works. ⑦ The same GLM model keeps images on an Anthropic-compatible endpoint but is treated as not supporting images on an OpenAI Chat-compatible one. ⑧ After setup, choose the channel in the model selector and send a short test instruction.

What the docs leave open, answered by the test and the source

As of 2026-11-10: ① How the path is joined: the docs do not say; in ZCode's source, an Anthropic base URL without a trailing /v1 gets /v1 added and the SDK then adds /messages, while OpenAI Chat and Responses append /chat/completions or /responses directly, so QCode takes https://api.qcode.cc/api and https://api.qcode.cc/openai/v1. ② Whether you must sign in to a Z.ai or BigModel account first: tested with ZCode CLI 0.17.1, a personal provider config alone is enough. ③ Responses: the desktop configuration page lists the Anthropic and OpenAI protocols and has no Responses entry of its own; the CLI's openai-responses type works in the test, again with https://api.qcode.cc/openai/v1. ④ How the desktop app chooses when one provider has both an Anthropic and an OpenAI address is still not documented, so one provider per protocol is the clearest setup.

Desktop app vs CLI: two entry points, two config files

Desktop app: add a provider in the UI

Per the official docs: Settings -> Model Settings → Add Provider. For the Anthropic and OpenAI endpoints, use the same addresses that passed the CLI test (https://api.qcode.cc/api and https://api.qcode.cc/openai/v1), then add model IDs with Add Model. The setup is saved in ~/.zcode/v2/config.json, where a provider's options hold baseURL.

CLI: write provider_config.json

The CLI reads ~/.zcode/v2/provider_config.json, not the desktop config.json. Each provider has one api.type: anthropic-messages with https://api.qcode.cc/api, or openai-chat-completions / openai-responses with https://api.qcode.cc/openai/v1; the key goes in access.apiKey and the models in personalModelIds. As of 2026-11-10, tested with ZCode CLI 0.17.1, all three work.

How to connect ZCode to QCode: desktop and CLI steps

Desktop: ① Install ZCode from zcode.z.ai (on macOS drag ZCode.app into the Applications folder, on Windows run the installer, on Linux use the AppImage, DEB or RPM). ② Click the model name in the chat box, then Manage Models at the bottom of the list to open Settings -> Model Settings. ③ Click Add Provider at the bottom of the provider list, name it QCode Claude, set the Anthropic endpoint to https://api.qcode.cc/api, enter your cr_ key, add models such as claude-sonnet-5-5 with Add Model, and turn on the enable switch. ④ Add a second provider, QCode OpenAI, with the OpenAI endpoint https://api.qcode.cc/openai/v1 and models such as gpt-6.1-sol and deepseek-v4-flash. ⑤ Select a model in the model selector and send a short test instruction. CLI: in ~/.zcode/v2/provider_config.json, add a provider under providerRules, put your cr_ key in access.apiKey, set api.type to anthropic-messages and api.baseUrl to https://api.qcode.cc/api (or openai-chat-completions / openai-responses with https://api.qcode.cc/openai/v1), list the model IDs in personalModelIds and point defaultModelSelection at it. The file holds the key in plain text, so restrict its permissions and keep it out of Git.

Running ZCode with a QCode API key

As of 2026-11-10, one QCode API key gives you both Anthropic- and OpenAI-compatible endpoints: Claude models on the Anthropic endpoint https://api.qcode.cc/api, GPT models on the OpenAI endpoint https://api.qcode.cc/openai/v1 (the same address for Chat and Responses), and the GLM, Kimi, DeepSeek and Qwen families on either the Anthropic endpoint or OpenAI Chat. Usage is billed per token with per-model rates on /models; common model IDs are claude-sonnet-5-5, claude-opus-5-5, gpt-6.1-sol, deepseek-v4-pro, glm-5.3, kimi-k3 and qwen3.8-max. Three steps: ① register and top up (Alipay and other major payment methods are supported); ② buy a Personal Plan or a Pay-as-you-go Pack and copy your API key, which starts with cr_; ③ add the providers in ZCode as above; the QCode docs article https://docs.qcode.cc/en/docs/ide/zcode walks through the same setup. Not ready for a monthly plan? Pay-as-you-go Packs (/pay-as-you-go) start at $4 for a one-time quota you use within 7 days; if you already have a Personal Plan, add a booster pack when you need more quota.

Frequently asked questions

Can ZCode use my own API key?

Yes. ZCode's official Connect Models page says it can add any model service compatible with the Anthropic / OpenAI protocols as a custom provider: Add Provider, enter the endpoint and API key, then add model IDs by hand with Add Model. As of 2026-11-10, tested with ZCode CLI 0.17.1, all three QCode protocols work directly: the Anthropic base URL is https://api.qcode.cc/api, OpenAI Chat and Responses use https://api.qcode.cc/openai/v1, and the key is your cr_ QCode key; usage is billed per token, with per-model rates on /models.

Where do I set up a custom model in ZCode?

Desktop: click the model name in the chat box, click Manage Models at the bottom of the model selector to open Settings -> Model Settings, then click Add Provider at the bottom of the provider list; on a first launch without a usable model, Use API Key on the welcome screen also leads to the model settings. CLI: edit ~/.zcode/v2/provider_config.json, not the desktop's ~/.zcode/v2/config.json, and put the address in api.baseUrl rather than options.baseURL. The official CLI docs also say ZCODE_BASE_URL relates to the product's own service endpoint, so a model API address does not go there.

Can ZCode use Claude?

ZCode's custom provider supports the Anthropic protocol, so you can enter QCode's Anthropic base URL https://api.qcode.cc/api and call Claude models; as of 2026-11-10, claude-haiku-5-5 replied directly in a test with ZCode CLI 0.17.1, and claude-sonnet-5-5 and claude-opus-5-5 are on /models too. Claude models are served only on that address; GPT models use the OpenAI base URL https://api.qcode.cc/openai/v1.

Does the ZCode base URL need /v1?

Not for Anthropic, yes for OpenAI. ZCode's source adds /v1 to an Anthropic base URL that does not already end in it, and the SDK then adds /messages, so enter https://api.qcode.cc/api (per the source, https://api.qcode.cc/api/v1 lands on the same /api/v1/messages). OpenAI Chat and Responses append /chat/completions or /responses directly, so enter https://api.qcode.cc/openai/v1. As of 2026-11-10 all three passed a test with ZCode CLI 0.17.1; leave off any trailing slash.

Does ZCode support Responses or Gemini?

The CLI supports Responses: set api.type to openai-responses and api.baseUrl to https://api.qcode.cc/openai/v1; as of 2026-11-10 this worked in a test with ZCode CLI 0.17.1 (gpt-6.1-terra). The desktop configuration page lists the Anthropic and OpenAI protocols without a Responses entry of its own; for GPT models in the desktop app, enter the OpenAI endpoint https://api.qcode.cc/openai/v1. The API types in the ZCode docs include no Gemini type; on QCode you can use Claude, GPT and the GLM, Kimi, DeepSeek and Qwen families, with model IDs on /models.

ZCode returns a 400 or 404 with QCode, what now?

Match the error. model_not_available_on_endpoint: a Claude model was added to the provider with the OpenAI address; put claude-… models in the provider whose address is https://api.qcode.cc/api. A 400 parameter error on the top thinking level: the docs say some third-party deployments only accept up to xhigh, so pick high. A 404: a common cause is a trailing slash, which turns the path into //v1/messages; enter /api and /openai/v1 exactly as above. Images dropped: in the official example, the same GLM model keeps images on an Anthropic-compatible endpoint but is treated as not supporting images on an OpenAI Chat-compatible one; for a custom model, declare its image capability in the model configuration.

Sources

ZCode: the Connect Models, install and FAQ pages and the changelog on zcode.z.ai, the ZCode page on docs.bigmodel.cn, and the README, LICENSE, CLI usage guide and configuration doc, the normalizeAnthropicBaseURL function in the source, repository data and Releases of zai-org/ZCode on GitHub, all read on 2026-11-10. Test: 2026-11-10, ZCode CLI 0.17.1 built from the repository source. QCode: qcode.cc/models, qcode.cc/pricing, qcode.cc/pay-as-you-go and the Endpoints & API Paths page on docs.qcode.cc, retrieved on 2026-11-10.

Run ZCode on your own key

Put one QCode API key into a ZCode custom provider: the Anthropic endpoint for Claude, the OpenAI endpoint for GPT, and either for Chinese models; billed per token, with per-model rates on /models.

Not sure where to start?

Try it for a week

Small Pack: $4 for $30 of quota, valid 7 days

Use it every day

Starter: $9.00/month with $5 of quota every day — just $0.060 per $1 of quota, vs about $0.113 for the Medium Pack