OpenClaw Model Configuration Guide
1. Overview
This guide explains how to configure a custom model provider in OpenClaw. After the configuration is complete, OpenClaw can call models through the specified API endpoint and use them for local Agent tasks.2. Prerequisites
Before you start, make sure you have the following:- OpenClaw installed on your device.
- A valid API Key.
- The model name you want to use.
- A network environment that can access the API service normally.
3. Open Terminal or Console
Open a terminal or command-line tool on your local device. macOS or Linux users can use Terminal. Windows users can use Command Prompt, PowerShell, or the terminal inside their development environment.4. Open the OpenClaw Configuration Interface
Run the following command in the terminal:5. Select Local Configuration
In the configuration menu, select:text
6. Enter Model Configuration
Continue by selecting:text
7. Select Custom Provider
Select:text
8. Configure the API Base URL
When prompted to enter the API Base URL, input:text
9. Enter the API Key
When prompted to enter the API Key, input your actual API Key. Example:text
Bearer prefix unless OpenClaw explicitly asks you to enter the full Authorization Header.
10. Enter the Model Name
When prompted to enter the model name, input the model ID you want to use. Example:text
11. Save the Configuration
After completing all required fields, confirm and save the configuration. Once saved successfully, OpenClaw will use this custom provider for local model calls.12. Configuration Example
text
13. Verify the Configuration
After completing the configuration, you can run an OpenClaw task or start a test session. If the configuration is correct, OpenClaw should be able to send requests to the API service and return model responses normally.14. Troubleshooting
1. API Request Failed
Check whether the API Base URL is correct:text
2. Model Not Found
Check whether the model name is entered correctly. Model IDs are usually case-sensitive. It is recommended to copy the model name directly from the platform.3. Authentication Failed
Check whether the API Key has expired, whether the account has sufficient balance, and whether the Key has permission to access the target model.4. Network Error
Make sure your device can access the API address normally. If the request cannot be completed, check your firewall, proxy, or VPN settings.15. Notes
For OpenAI-Compatible API services, the API Base URL usually ends with/v1.
Correct example:
text
text