How to Set Up a Custom Model Provider in OpenClaw
OpenClaw supports custom model providers through its Settings panel. This guide walks you through adding ClawPane as a provider so every agent in your gateway gets smart model routing automatically.
Prerequisites
Before starting, you'll need:
- An OpenClaw instance (self-hosted or cloud)
- Admin access to OpenClaw's Settings
- A ClawPane account (free to create at clawpane.co)
Step 1: Create a ClawPane Router
Before adding ClawPane to OpenClaw, you need at least one router:
- Go to ClawPane Dashboard → Create Router
- Choose a preset or configure custom weights:
- Auto — balanced across cost, speed, and quality
- Fast — lowest latency
- Economy — cheapest viable model
- Quality — highest quality regardless of cost
- Name your router (e.g.,
production-balanced) - Save the router
You can create multiple routers for different workloads later.
Step 2: Get Your API Key
- Navigate to ClawPane Dashboard → Settings
- Click Generate API Key
- Copy the key — it starts with
mp_
This key works across all your routers. You only need one.
Step 3: Add ClawPane to OpenClaw
In your OpenClaw instance:
- Go to Settings → Model Providers
- Click Add Provider
- Fill in the fields:
Provider Name: ClawPane
Provider URL: https://clawpane.co/route
API Key: mp_xxxxxxxxxxxxxxxx
Model ID: auto
SDK: OpenAI
- Save the provider
Step 4: Configure Model IDs
The Model ID tells ClawPane which router to use. You have several options:
| Model ID | Behavior |
|---|---|
auto | Uses your default router (balanced) |
fast | Uses the built-in speed-optimized preset |
economy | Uses the built-in cost-optimized preset |
quality | Uses the built-in quality-optimized preset |
your-router-id | Uses a specific custom router |
To use different routers for different agents, set the Model ID per agent in OpenClaw's agent configuration.
Step 5: Test the Connection
Create a simple test in OpenClaw:
- Open any agent that uses ClawPane as its model provider
- Send a test message
- Check the response metadata for:
x-model-used— which model handled the requestx-model-cost— what the request costx-routing-time— how long routing took
If you see these headers, ClawPane is working correctly.
Troubleshooting
"Connection refused" or timeout
- Verify the Provider URL is exactly
https://clawpane.co/route - Check that your API key is valid and not expired
Agent returns empty responses
- Ensure the Model ID matches a valid router or preset
- Check ClawPane dashboard for error logs
Higher than expected latency
- Routing adds <100ms overhead. If you see more, check your network path
- Try the
fastpreset to prioritize low-latency models
What Happens Next
Once connected, every request from your OpenClaw agents flows through ClawPane:
- Agent sends a request via OpenClaw
- OpenClaw forwards to ClawPane (as a provider)
- ClawPane scores available models against your router weights
- Best model is selected; request is forwarded
- Response returns through the chain with routing metadata
Your agents don't know or care which model handles their requests. The routing is completely transparent.
Advanced: Multiple Routers per Agent Type
For teams with diverse workloads, set up separate routers:
- Support agents →
economyrouter (cost-first) - Code agents →
qualityrouter (quality-first) - Triage agents →
fastrouter (speed-first)
Each agent in OpenClaw can point to a different ClawPane Model ID, giving you per-workload optimization through a single provider.