OpenAI and Anthropic protocols. For HaiToken, the OpenAI path is usually the most stable and broadly compatible choice; if you explicitly want the Claude / Anthropic ecosystem, you can also use the Anthropic path.
What you need
- A HaiToken API key
- HaiToken OpenAI-compatible address:
https://api.haitoken.ai/v1 - HaiToken Claude / Anthropic-compatible address:
https://api.haitoken.ai - At least one available model ID, such as
gpt-5.4
ZCode is configured entirely through the GUI, so the steps are essentially the same on Windows, macOS, and Linux. If menu placement or dialog layout differs slightly on your system, follow the actual UI — the API key, Base URL, and model ID values remain the same.
Setup Steps
Choose the protocol first
In ZCode, the two common choices are:OpenAI: recommended first, broader compatibility, and the main flow in this guideAnthropic: also common, useful when you explicitly want the Claude / Messages ecosystem
OpenAI.
Step 1: Open Model Settings
In the ZCode main interface, click Model Settings in the left sidebar to open the model provider management page.Step 2: Add a Custom Provider
In the Custom Providers area of the model settings page, click the + Add Provider button to open the provider configuration form.Step 3: Fill in HaiToken Configuration
In the provider configuration form, enter the following:If you choose the
Anthropic path, do not enter https://api.haitoken.ai/v1. This path should use the Anthropic-style gateway prefix https://api.haitoken.ai, and the client should call /v1/messages through that gateway.Step 4: Add Models
In the Model List area, click + Add Model and enter the HaiToken model ID you want to use, such asgpt-5.4. You can add multiple models.
Step 5: Save the Provider
After filling in the fields, click the Add Provider button at the bottom of the form to save the configuration.Step 6: Verify Connectivity
After saving, switch to the newly configured HaiToken model in the ZCode chat or coding panel, and send a simple message (such ashello) to verify connectivity.
Notes
If you need to configure advanced parameters such as temperature, max output length, or system prompt, keep the defaults for your first test and verify connectivity first.
FAQ
Next
- See Get API Key
- See OpenAI format API
- See List models