Use Case:
| Suitable for users who have already deployed Coze Studio locally or on a server and want to use MaiToken models to build agents and workflows. |
|---|
| This section applies to Coze Studio Open Source Edition. Before configuring, finish deploying Coze Studio and verify that you can open the admin console normally. |
|---|
Configuration Steps
Open Model Management: On the machine where Coze Studio is deployed, open http://localhost:8888/admin/#model-management . If deployed on a server, replace
localhostwith your actual management host.Add Model: Click "Add Model".
Select Protocol: Set Protocol to
openai.Enter Base URL: Enter https://api.maitoken.net/v1 . The Model Management page expects a Base URL—typically do not append
/chat/completions.Enter API Key: Paste your own MaiToken Key.
Enter Model ID: Enter
<Model ID>in Model ID or Model. Once the model is in use, do not change its ID arbitrarily, or existing agents may fail to find it.Configure Model Capabilities: Enable options such as Function Calling, Vision, and Reasoning based on the model's actual capabilities. If unsure, start by enabling text and tool calling capabilities.
Test and Save: Click "Test". Once the test passes, save and enable the model.
Select the Model in an Agent: Create a new test Agent, select the MaiToken model you just added from the model selector, save it, and open the debug page.
| Field | Value |
|---|---|
| Protocol | openai |
| Base URL | https://api.maitoken.net/v1 |
| API Key | <Your MaiToken Key> |
| Model ID | <Model ID> |
How to Test After Setup
Test Basic Chat: Enter
"Reply OK only"in the chat box. Receiving a normal reply confirms that your API Key, API address, and Model ID are basically correct.Test Tool Calling: Enter
"Please call a simple tool; if no tools are currently available, reply OK only."Test Agent: Have the Agent run a simple test task and verify the output matches expectations. Do not run your first test on a real production workflow.
Troubleshooting
| Issue | Suggested Fix |
|---|---|
| Admin console will not open | Verify that Coze Studio is deployed and running; if using Docker, check port mappings as well. |
| Model test returns 404 | Base URL must be https://api.maitoken.net/v1 without appending /chat/completions. |
| Agent cannot find the model | Confirm that the model is enabled, then refresh the model selector on the Agent editing page. |
