OpenClaw
OpenClaw custom providers are configured through models.providers. For rout.my, use the OpenAI-compatible openai-completions adapter and the /v1 base URL.
Save your key
bash
export ROUTMY_API_KEY="sk_your_key_here"Choose model IDs
List models first:
bash
curl https://api.rout.my/v1/models \
-H "Authorization: Bearer $ROUTMY_API_KEY"Use any exact id returned by the API. The sample below uses neutral placeholders.
Example config
Save this to ~/.openclaw/openclaw.json.
json
{
"agents": {
"defaults": {
"model": {
"primary": "rout/provider/model-id",
"fallbacks": ["rout/provider/alternate-model-id"]
},
"models": {
"rout/provider/model-id": { "alias": "Primary via rout.my" },
"rout/provider/alternate-model-id": { "alias": "Fallback via rout.my" }
}
}
},
"models": {
"mode": "merge",
"providers": {
"rout": {
"api": "openai-completions",
"baseUrl": "https://api.rout.my/v1",
"apiKey": "${ROUTMY_API_KEY}",
"models": [
{ "id": "provider/model-id", "name": "provider/model-id" },
{ "id": "provider/alternate-model-id", "name": "provider/alternate-model-id" }
]
}
}
}
}OpenClaw uses rout/ as the provider prefix and sends the remaining model ID to rout.my.
Validate
bash
openclaw config validate
openclaw gateway startTest the key
bash
curl https://api.rout.my/v1/chat/completions \
-H "Authorization: Bearer $ROUTMY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "provider/model-id",
"messages": [{ "role": "user", "content": "Hello!" }]
}'