OpenClaw Configuration
OpenClaw is a terminal/Web UI tool oriented towards programming scenarios. It supports multiple model protocols, so the focus of configuration is not just to fill in one address, but to make the baseUrl and api match in pairs.
Official information Downloads and documentation are subject to the official site.
What this tool is and what it is used for
First confirm how to choose the agreement
| Scenarios | How to view the Base URL | How to choose the API field |
|---|---|---|
| OpenAI Native | Use the OpenAI / OpenAI-compatible API address provided by the provider, whether to include /v1 depends on the backend | openai-responses |
| Claude Native | Use the Anthropic / Claude interface address provided by the provider | anthropic-messages |
| Gemini Native | Use the Google / Gemini interface address provided by the provider | google-generative-ai |
| Compatibility Mode | The provider's OpenAI-compatible interface address | openai-completions |
If the provider's page separates the OpenAI, Claude, and Gemini interfaces, do not just copy the domain name; copy the complete address for the corresponding protocol as well.
Configuration snippet reference
Configuration files are usually located in ~/. openclaw/openclaw.json If the initialization wizard cannot correctly fill in the provider address, you can first skip the model selection and then manually edit the configuration file.
OpenClaw Single Provider Example Snippet
"models": { "providers": { "mz-openai": { "baseUrl": "https://YOUR_PROVIDER_API_URL", "apiKey": "YOUR_KEY", "auth": "api-key", "api": "openai-responses", "models": [ { "id": "MODEL_ID_FROM_PROVIDER_DASHBOARD", "name": "DISPLAY_NAME", "reasoning": false, "input": [], "contextWindow": 128000, "maxTokens": 32000 } ] } } } How to check after saving
- First, configure only one provider, and do not add many models at once.
- Enter the test project and select the newly added model.
- Send the shortest question, such as 'Please only reply with configuration successful. '
- If a protocol error is reported, first check whether the api field and Base URL come from the same type of interface.
Common Questions for Beginners
| Phenomenon | Priority check | Handle |
|---|---|---|
| Protocol-related error | api Whether the field matches the Base URL | Do not mix OpenAI, Claude, and Gemini; fill in according to the corresponding provider's agreement |
| The model list is empty | Does the provider support fetching the model list? | Manually enter the model ID / model name provided by the backend when pulling fails |
| The configuration file was changed but it is not taking effect | Whether the OpenClaw actual read configuration file has been edited | Restart OpenClaw and test again; do not change multiple configuration settings at the same time |
| Key is correct but still fails | The auth and apiKey fields of the current Provider | Confirm that the Key belongs to the current agreement and the current provider |
OpenClaw Official Website View tool introduction and entry.
OpenClaw AI provider Configuration Reference Refer to the idea of configuring the baseUrl and api fields in pairs under different protocols.
