58API Help Center58API Help Center
User GuideAI ApplicationsAPI DocumentationHelp & Support

ZCode - 58API configuration tutorial

Access 58API through "Create Custom Supplier" in ZCode, fill in the Base URL and add the model according to the three API formats: Anthropic Messages, Responses, and Chat Completions.

ZCode is an Agentic Development Environment (ADE) launched by Z.ai, which provides desktop, browser workspace and terminal Agent, and has been open sourced on GitHub under the Apache-2.0 protocol. This tutorial introduces how to create a custom supplier access 58API in ZCode and use models such as Claude, GLM, DeepSeek, GPT, and Gemini in the same ZCode.

Must read: Whether the Base URL should contain /v1 depends on the API format

  • Chat Completions and Responses format: ZCode will not automatically complete /v1, Base URL must be filled in https://api.58api.net/v1. If you only fill in https://58api.net, the request will be sent to https://58api.net/chat/completions, was redirected to the 58API official website, and the call failed.
  • Anthropic Messages Format: ZCode will automatically fill in /v1,fill https://api.58api.net That’s it; fill in https://api.58api.net/v1 It can also be used normally and will not become /v1/v1。
  • Do not use any format /chat/completions、/responses or /v1/messages Write the Base URL, and the interface path will be automatically spliced ​​by ZCode according to the API format.
  • In the text of ZCode official configuration document, the example addresses of OpenAI and OpenRouter are not included. /v1. Do not copy when accessing 58API, please refer to this page.

This article is written based on ZCode 3.14.5 desktop version. If the interface text is slightly different, please follow the path "Settings → Model Settings → Add Supplier → Create Custom Supplier".

Configuration quick check

ZCode configuration itemsFill in the content
EntranceSettings → Model Settings → Add Supplier → Create Custom Supplier
nameModify it through "Rename" in the "..." menu in the upper right corner of the card, for example 58API、58API-GPT、58API-Chat
Base URLSee the table below, pay attention to whether to bring /v1
API formatEach supplier can only choose one, see the table below
API KeyThe key created on the "API Key" page of the 58API console
ModelClick "Add Model" and manually fill in the model ID and context window

Base URL corresponding to the three API formats:

API format (ZCode interface display)Base URLActual request addressRecommended model
Anthropic Messages (/v1/messages)https://api.58api.nethttps://api.58api.net/v1/messagesClaude、GLM、DeepSeek、Kimi、Qwen、MiniMax、MiMo
Responses (/responses)https://api.58api.net/v1https://api.58api.net/v1/responsesGPT
Chat Completions (/chat/completions)https://api.58api.net/v1https://api.58api.net/v1/chat/completionsGemini、Grok

If you want to save trouble, you can also fill in the three formats uniformly. https://api.58api.net/v1: Anthropic Messages format has detected that the address has been /v1 It will not be appended repeatedly at the end.

Preparation before use

  1. Download and install the latest version of ZCode (supports macOS, Windows x64 / ARM64 and Linux).
  2. Register and log in to 58API console https://58api.net, confirm that the account has available balance.
  3. Create an API Key on the "API Key" page of the 58API console and confirm that the group it belongs to contains the model you plan to use.
  4. Confirm the model ID to be added from the 58API model list.
  5. Prepare a test project directory. ZCode can read and modify workspace files and execute commands. For the first test, it is recommended to use a project that is easy to roll back.

It is recommended to create a separate API Key for ZCode and set the quota as needed. Do not include the complete key in tutorials, screenshots, project files, or chat messages.

1. Download and install ZCode

Open ZCode official website https://zcode.z.ai/cn, download the installation package for the corresponding system and complete the installation.

When starting up for the first time, the "Connect Z.ai / BigModel to continue using" and "Use API key" provided on the welcome page are only used for Zhipu's own services (the provider of "Use API key" can only choose Z.ai or BigModel), Do not fill in the 58API key here. You can click "Use API key", then click "Skip Temporarily" at the bottom of the form to enter the main interface, and then add 58API to the model settings as follows.

2. Obtain 58API key

Go to the API Keys page of the 58API console, create or select an existing key, and copy the API Key.

Copy API Key in 58API console

The API Key should only be pasted into ZCode's vendor configuration and not saved to the project repository.

3. Open the model settings and create a custom supplier

  1. Open ZCode's "Settings → Model Settings". You can also click the current model name in the chat input box and select "Manage Model" to enter the same page.
  2. Click "Add Supplier" at the bottom of the supplier list on the left.
  3. Click "Create Custom Supplier" in the "Other" group on the "Add Supplier" page. Do not choose preset templates such as OpenAI, Anthropic, DeepSeek, etc., as they are pre-filled with the official addresses of each company. ZCode will immediately create a supplier named "New Supplier" and open its configuration card.
  4. Click the "..." menu in the upper right corner of the card, select "Rename", and change the name to 58API。
  5. Complete the following table for your first supplier (Anthropic Messages format):
FieldFill in the valueillustrate
Base URLhttps://api.58api.netZCode will automatically add /v1,fill https://api.58api.net/v1 OK
API formatAnthropic Messages (/v1/messages)The default format for creating a new custom supplier is this format, which is suitable for Claude and domestic models.
API KeyYour 58API API KeyPaste the complete key without spaces before and after it
  1. Click "Add Model" under "Model List" and fill in the model ID and context window. See the recommended list in the next section for model IDs.
  2. Confirm that the supplier's enable switch in the upper right corner of the card is turned on.

Note the following points:

  • Supplier cards do not have a separate "Save" button. The name, Base URL, API format, and API Key will be automatically saved after the input box is out of focus or input stops, and a "save successfully" message will be displayed.
  • The newly created custom supplier does not have any models, and the model list will not be automatically pulled. You need to click "Add Model" one by one to fill it in manually; you can only select it in the chat after adding at least one model.
  • The context window must be a positive integer. If the Add Model window prompts "Matched to Intelligent Configuration", the context window can be left blank and directly use the recommended value shown in gray in the input box; otherwise, please fill it in according to the actual capabilities of the model. If you are not sure, fill in a conservative value first, for example 128000。
  • When ZCode saves, it will only remove the /, will not delete redundant interface paths for you. The placeholder for the Base URL input box also has /v1 of https://api.example.com/v1。

Each ZCode provider can only choose one API format. Different models of 58API support different protocols. It is recommended to set up three suppliers as follows. They can use the same 58API API Key.

Only add models that are actually available to the account

The following model IDs are from the 58API current model list. Please only add models that are actually available in the group your API Key belongs to. The model ID must be filled in exactly as it is, including upper and lower case, periods, and hyphens. Do not add videos, raw images, or speech models (e.g. veo-3.1、gpt-image-2、gemini-3.1-flash-tts), they cannot be used for ZCode's conversational and programming tasks.

Supplier 1: Anthropic Messages (Claude and domestic models)

FieldFill in the value
name58API
Base URLhttps://api.58api.net
API formatAnthropic Messages (/v1/messages)

Recommended model:

Model IDillustrate
claude-sonnet-5-5Claude, daily programming main force
claude-opus-5-5Claude, for complex tasks
claude-haiku-5-5Claude, lightweight and fast
glm-5.3GLM
deepseek-v4-proDeepSeek
deepseek-v4.1-flashDeepSeek, lightweight and fast
kimi-k3Kimi
qwen3.8-maxQwen
MiniMax-M3MiniMax, pay attention to capitalization
mimo-v2.6-proXiaomi MiMo

Supplier 2: Responses (GPT)

FieldFill in the value
name58API-GPT
Base URLhttps://api.58api.net/v1(Must bring /v1)
API formatResponses (/responses)

Recommended model:

Model IDillustrate
gpt-6.1-solGPT, the latest programming powerhouse
gpt-6-astraGPT flagship, suitable for complex tasks

Vendor Three: Chat Completions (Gemini and Grok)

Gemini and Grok models do not support the Anthropic protocol on 58API, and a separate provider of Chat Completions format needs to be built.

FieldFill in the value
name58API-Chat
Base URLhttps://api.58api.net/v1(Must bring /v1)
API formatChat Completions (/chat/completions)

Recommended model:

Model IDillustrate
gemini-3.1-pro-previewGemini, suitable for complex tasks
gemini-3.8-flashGemini, lightweight and fast
grok-4.7Grok

After all three suppliers are created, confirm that their enable switches are turned on.

5. Select a model and test it

  1. Open or create a new session and select the project directory you want to test.
  2. Click the model name in the chat input box. 58API、58API-GPT or 58API-Chat Select a model below.
  3. First send a read-only task:
请概括当前项目的目录结构,先不要修改文件,也不要运行安装命令。

After confirming that it can be restored normally, test a modification task with a clear scope and easy rollback. It is recommended that each of the three suppliers select a model and test it once to confirm that the Base URL of each API format is filled in correctly.

In the model list of "Settings → Model Settings", there is a "Test Model" button on the right side of each model, which can be used to quickly check the connection; the corresponding provider needs to be enabled before testing.

6. Verify the request on 58API

Open the 58API console, enter "Usage Log", and confirm that the request record just now appears.

Verify request in 58API usage log

Key points to check:

  • The request uses the model just selected;
  • Status successful, no continuous retries;
  • The token and fee are consistent with the scale of the test task;
  • The request time is consistent with the ZCode test time.

Verification Checklist

  • The 58API supplier has been added through "Create Custom Supplier" and the enable switch has been turned on;
  • The Anthropic Messages vendor's Base URL is https://api.58api.net(or https://api.58api.net/v1);
  • The Base URL for the Responses and Chat Completions provider is https://api.58api.net/v1;
  • Each vendor has added at least one model, and the model ID is exactly the same as the 58API model list;
  • The 58API model can be seen and selected in the model selector of the chat input box;
  • Simple read-only tasks can be restored normally;
  • 58Corresponding requests appear in API usage logs.

FAQ

Return 404, 301, or the error content is a piece of webpage HTML

The Base URL is almost always filled in incorrectly. Check each item by API format:

  • Chat Completions and Responses Format: Base URL must be https://api.58api.net/v1. omission /v1 , the request will be sent to https://58api.net/chat/completions or https://58api.net/responses, was redirected to the 58API official website by 301, and the web page was returned instead of the interface data.
  • Anthropic Messages Format: Fill in https://api.58api.net or https://api.58api.net/v1 It will be all right.
  • Do not add after the Base URL /chat/completions、/responses or /v1/messages. ZCode will not automatically delete these paths and will spell them into something like https://api.58api.net/v1/chat/completions/chat/completions wrong address.

The OpenAI example in the official ZCode document is written as https://api.openai.com, OpenRouter writes https://openrouter.ai/api, not even brought /v1; But both OpenAI formats actually need to bring /v1. To access 58API, please fill in this page.

Prompt model not found or model does not exist

ZCode's custom provider does not automatically pull the model list, and the model ID needs to be filled in manually. Please go back to the 58API model list and copy the model ID as it is. The case, period and hyphen cannot be changed. For example MiniMax-M3 cannot be written as minimax-m3. Do not fill in a numeric ID, Chinese display name, or self-made alias.

Also make sure the model is placed under the correct format provider: for example Gemini and Grok models cannot be added to the Anthropic Messages format provider.

Prompt that there are no available channels under the current group

The group to which the API Key belongs must contain the group to which the model belongs. Go to the "API Keys" page of the 58API console to check the grouping settings for this key; if necessary, create a separate key for ZCode with the appropriate grouping, or use a model available for the current grouping instead.

Prompt 401 or authentication failed

Copy the API Key from the 58API console again, check whether there are spaces or newlines before and after, and confirm that the key is not disabled and the quota is available. The three suppliers need to fill in the API Key respectively, and modifying one of them will not be synchronized to the other suppliers.

DeepSeek returns 400 after selecting the highest thinking intensity

ZCode displays the optional thinking intensity by model. If you select the highest gear for the DeepSeek model (e.g. max) and return 400 parameter error, change the thinking intensity to high Try again.

The 58API model cannot be seen in the model selector

Go back to "Settings → Model Settings" and check item by item: the enable switch of the corresponding supplier is turned on; at least one model has been added to the supplier's "Model List", and the model itself has not been disabled. The newly created custom supplier does not have any model by default. You need to click "Add Model" first to fill in the model ID and context window.

Need to access the network through a proxy

ZCode does not read system data by default HTTP_PROXY / HTTPS_PROXY environment variables. If your network requires a proxy to access https://api.58api.net, please fill in the proxy address in "HTTP Proxy" in ZCode settings (for example http://127.0.0.1:7890), the modification will take effect only after restarting ZCode.