Use Cases
| Suitable for users who want to add an OpenAI-compatible model to QClaw and use it for code-related questions and Agent operations. |
|---|
Configuration Steps
Open Model Settings: Start QClaw, open “Settings,” and find “Models,” “API,” or “Model Providers.”
Add a Provider: Click “Add,” and select OpenAI or OpenAI Compatible as the provider or protocol.
Enter the Base URL: Enter https://api.maitoken.com/v1 . QClaw will automatically append
/chat/completionsto this address.Enter the API Key: Paste your MaiToken Key. Do not manually add
Bearerbefore the Key.Enter the Model Name: Enter
<Model ID>in the Model ID field. You can set the display name toMaiToken - Model ID.Save and Select the Model: Save the configuration, return to the chat window, and select the newly added model from the model list.
| Field | Value |
|---|---|
| Protocol or Provider | OpenAI or OpenAI Compatible |
| Base URL | https://api.maitoken.com/v1 |
| API Key | <your MaiToken Key> |
| Model ID | <Model ID> |
Test the Configuration
Test a Basic Conversation: Enter “Reply with OK only” in the chat box. If you receive a valid response, the API Key, Base URL, and Model ID are configured correctly.
Test Project Reading: Open a test project and enter “Read the current project directory and list only the files at the first level. Do not modify any files.”
Test Agent Capabilities: Ask the Agent to create a file named
test-maitoken.txtand writehellointo it. Confirm that the file was created successfully. Do not use a real production project for testing.
Common Issues
| Issue | Solution |
|---|---|
| 404 or path error | Confirm that the Base URL ends at /v1. Do not enter the full /chat/completions path. |
| Model list is empty | Add the exact Model ID manually, or check the current API Key's model restriction list in the MaiToken console. |
| Agent execution is interrupted | Confirm that the model supports streaming output and tool calling. If necessary, switch to a model suitable for code or Agent tasks. |
