What is OpenClaw
OpenClaw is an open-source local AI gateway tool that runs in the terminal, supporting unified access to multiple AI model providers. It has built-in support for mainstream providers like OpenAI, Anthropic, and Google, and also supports connecting any OpenAI or Anthropic compatible third-party endpoint via Custom Provider. By configuring LaoZhang API as a Custom Provider, you can access 200+ AI models in OpenClaw, including the latest GPT-5, Claude Opus 4.6, Gemini 2.5 Pro, and more.Prerequisites
- OpenClaw installed (refer to OpenClaw official documentation)
- LaoZhang API account with an API key (visit LaoZhang API Token Management to create a new token — select pay-per-use billing, default group, and keep all other settings as default)
Configuration Steps
Step 1: Select Custom Provider
After launching the OpenClaw configuration wizard, scroll to the bottom of the Model/auth provider list and select Custom Provider (Any OpenAI or Anthropic compatible endpoint).请在 Console 查看对应界面截图。
Step 2: Enter API Base URL
In the API Base URL field, enter the LaoZhang API endpoint:请在 Console 查看对应界面截图。
https://api.yelinai.com/v1. HTTPS is recommended for better security.
Step 3: Choose API Key Method
When asked how to provide the API key, select Paste API key now to store the key directly in OpenClaw config.请在 Console 查看对应界面截图。
Step 4: Enter API Key
Paste your API key from the LaoZhang API console in the API Key field (a string starting withsk-).
请在 Console 查看对应界面截图。
Step 5: Select Endpoint Compatibility
Under Endpoint compatibility, select OpenAI-compatible (Uses /chat/completions).请在 Console 查看对应界面截图。
/chat/completions endpoint. Select this option to proceed.
Step 6: Set Model ID
Enter the model name you want to use in the Model ID field.请在 Console 查看对应界面截图。
Step 7: Verify and Complete
OpenClaw will automatically verify the configuration. Once verification succeeds, the system generates an Endpoint ID (e.g.,custom-api-laozhang-ai) and the setup is complete.
请在 Console 查看对应界面截图。
Recommended Models
Through LaoZhang API, you can use the following popular models in OpenClaw:| Model Series | Model ID | Highlights |
|---|---|---|
| GPT-5 | gpt-5.2 | OpenAI’s latest flagship model |
| Claude Opus 4.6 | claude-opus-4-6 | Anthropic’s most capable reasoning model |
| Claude Sonnet 4.6 | claude-sonnet-4-6 | Balanced performance and cost |
| Gemini 2.5 Pro | gemini-2.5-pro | Google’s latest multimodal model |
| GPT-4o | gpt-4o | Classic, stable, and fast |
- Complex coding tasks: Use
claude-opus-4-6orgpt-5.2 - Daily conversation: Use
gpt-4o - Multimodal tasks: Use
gemini-2.5-pro - Best value: Use
claude-sonnet-4-6
Configuration Summary
After completing setup, your OpenClaw key parameters are:| Setting | Value |
|---|---|
| Provider | Custom Provider |
| API Base URL | http://api.yelinai.com/v1 |
| Endpoint Compatibility | OpenAI-compatible |
| Endpoint ID | custom-api-laozhang-ai |
Troubleshooting
Verification Returns Error
Verification may return an error on the first attempt. Simply retry and it usually succeeds.Connection Timeout
- Check your network connection
- Verify the API Base URL is entered correctly
- Try using
https://api.yelinai.com/v1
Model Call Failures
- Confirm your account has sufficient balance
- Check that the Model ID is spelled correctly
- Review call logs on the LaoZhang API Log page for troubleshooting