OpenClaw
Run OpenClaw on BoostRail
OpenClaw runs agents continuously, which makes it one of the most token-hungry setups a developer can have. It also expects you to bring your own model access. Adding BoostRail as a custom provider gives every agent one key, one bill, and the full catalog to choose from.
Why one API suits a long-running agent
A continuously running agent repeats context constantly. Where a model's route supports prompt caching, cached input bills at the cache-read price published for that model — at or below the provider's own cache-read price, DeepSeek V4 Pro, DeepSeek V4.1 Flash and Kimi K3 excepted — and cache writes carry no surcharge. Leading models are priced at or below their official list prices.
It also means a single provider outage or rate wall stops your agent mid-task. Through BoostRail you get one OpenAI-compatible endpoint across leading models, so switching models is a string change in your config rather than a new account, a new key, and a new integration.
Add BoostRail as a custom provider
OpenClaw reads ~/.openclaw/openclaw.json (JSON5 — comments and trailing commas are fine). Define the provider under models.providers, then reference its models as boostrail/<model-id>.
~/.openclaw/openclaw.json
{
models: {
mode: "merge",
providers: {
boostrail: {
baseUrl: "https://api.boostrail.com/v1",
apiKey: "${BOOSTRAIL_API_KEY}",
api: "openai-completions",
models: [
{
id: "claude-sonnet-5",
name: "Claude Sonnet 5",
input: ["text"],
contextWindow: 200000,
maxTokens: 64000,
},
],
},
},
},
agents: {
defaults: {
model: { primary: "boostrail/claude-sonnet-5" },
},
},
}- Set BOOSTRAIL_API_KEY in the environment OpenClaw runs in. The key value goes in the environment, not in the config file.
- Add one model entry per model you want to use, with the exact id from the Models page. The catalog ids are stable strings — claude-sonnet-5, deepseek-v4.1-flash, gpt-5.4, and so on.
- If your setup restricts models through agents.defaults.modelPolicy.allow, add the ref boostrail/* or the exact model refs — a provider definition alone does not make a model selectable.
- contextWindow and maxTokens describe the model you picked, not BoostRail. Check the Models page for the values that apply to your model, including the models that carry a context cap.
Anthropic-protocol alternative
OpenClaw also ships an anthropic-messages adapter. If you want Claude models over Anthropic's native protocol rather than the OpenAI-compatible face, point that adapter at the API root instead.
Provider block, Anthropic protocol
boostrail-anthropic: {
baseUrl: "https://api.boostrail.com",
apiKey: "${BOOSTRAIL_API_KEY}",
api: "anthropic-messages",
models: [
{ id: "claude-sonnet-5", name: "Claude Sonnet 5", input: ["text"] },
],
}Confirm it is working
Before letting an agent run unattended, make one call with the same key and base URL. If curl succeeds and OpenClaw does not, the problem is the config file or the model allowlist, not BoostRail.
One call, straight to the API
curl https://api.boostrail.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"reply with OK"}]}'A working setup returns a JSON body with a choices array and the model's reply inside it. Your usage and the exact price applied to that request appear in the console within a few seconds.
OpenClaw FAQ
Which wire protocol should I choose?
openai-completions covers the whole catalog through one provider block, so it is the simpler default. Use anthropic-messages when you specifically want Claude models over Anthropic's native protocol; you can define both provider blocks side by side.
Is this configuration officially verified end to end?
It follows OpenClaw's documented custom-provider format, and targets the same endpoints as the other coding-tool configs on this site. We have not run OpenClaw end to end against BoostRail — if anything in your setup differs, tell us and we will correct this page.
How is a long-running agent billed?
Per token in USD; leading models are priced at or below their official list prices. Where a model's route supports prompt caching, cached input bills at the cache-read price published for that model — at or below the provider's own cache-read price, DeepSeek V4 Pro, DeepSeek V4.1 Flash and Kimi K3 excepted — and cache writes carry no surcharge. There is no monthly seat or subscription window — you pay for what the agent actually consumes.
Can I keep my own provider keys?
Yes. BYOK routes requests through your own provider accounts and contract prices while keeping one integration, with a free monthly BYOK allowance and platform fallback when a key is exhausted.
One key for every agent you run
Create a key, add the provider block, and point your agents at any model in the catalog.
Last updated: 2026-10-03