OpenClaw integration
Add Modellane to OpenClaw as a custom model provider that uses the OpenAI Chat Completions API, and make it the default model.
OpenClaw lets you declare custom model providers. Add Modellane with the Chat Completions API type, list the models you want and set one as primary.
OpenClaw is an open-source personal AI assistant that runs on your own machine. It lets you declare custom model providers; Modellane uses the openai-completions API type, which calls the Chat Completions API (POST /v1/chat/completions).
Declare the provider#
Merge this block into your OpenClaw configuration file (JSON5):
JSON
{
"agents": {
"defaults": {
"model": { "primary": "modellane/lane-1" },
"models": { "modellane/lane-1": { "alias": "Modellane" } }
}
},
"models": {
"mode": "merge",
"providers": {
"modellane": {
"baseUrl": "https://usemodellane.com/v1",
"apiKey": "${MODELLANE_API_KEY}",
"api": "openai-completions",
"models": [
{
"id": "lane-1",
"name": "Lane 1",
"reasoning": false,
"input": ["text"],
"contextWindow": 128000,
"maxTokens": 8192
}
]
}
}
}
}| Param | Value |
|---|---|
baseUrl | https://usemodellane.com/v1 |
apiKey | Your key from API keys, here read from the MODELLANE_API_KEY environment variable |
api | openai-completions |
id | lane-1, or any id from Models & pricing |
contextWindow, maxTokens | The context length and output limit from the models table |
input | ["text", "image"] only for models that list Vision |
In agents.defaults, OpenClaw refers to the model as <provider>/<model id>. Here modellane/ is the name of the provider block, not part of the Modellane model id. Add one entry per model you want to use.
Verify#
Save the configuration (restart OpenClaw if it does not pick up the change), then send "Reply with the word ready." A reply means the provider works. An authentication error points at the key, and model_not_found at the model id.
If a request is rejected because of an optional field, OpenClaw's compat options for the provider (for example for the usage chunk in streams) let you turn single features off.