Run OpenClaw on Stav
Add Stav as a custom provider in OpenClaw with one config block, and run its agent on EU compute.
OpenClaw is an open-source personal agent. It runs on your machine, uses tools, and answers you in chat apps through its Gateway. It can talk to any OpenAI-compatible API, so it runs on Stav with configuration only.
Point it at Stav and every agent turn is billed to your Stav credits, shows up in your request log, and follows your workspace policy. Pick an EU-served model and the work runs on EU compute.
Tested with OpenClaw 2026.10.2 on the Chat Completions API.
Before you start
- A Stav API key. See Authentication.
- OpenClaw installed. See the OpenClaw install guide.
Set it up
Put your key in the environment OpenClaw starts in:
export STAV_API_KEY=sk_stav_live_...
Add Stav as a provider in ~/.openclaw/openclaw.json:
{
agents: {
defaults: { model: { primary: "stav/zai-org/glm-5-2/scaleway-generative-apis" } }
},
models: {
providers: {
stav: {
baseUrl: "https://api.stav.ai/v1",
apiKey: "${STAV_API_KEY}",
api: "openai-completions",
models: [
{ id: "zai-org/glm-5-2/scaleway-generative-apis", name: "GLM 5.2 (Paris)",
reasoning: true, compat: { supportsReasoningEffort: true },
input: ["text"], contextWindow: 96000, maxTokens: 16384 },
{ id: "auto", name: "Stav default Router",
input: ["text"], contextWindow: 200000, maxTokens: 16384 }
]
}
}
}
}
- Keep
/v1inbaseUrl. OpenClaw adds/chat/completionsitself and does not add/v1. - Model refs are
stav/<model id>. OpenClaw puts the provider name in front of Stav's own id:stav/zai-org/glm-5-2/scaleway-generative-apis. The slashes in the id are fine. - Set
contextWindowfor every model. OpenClaw does not know Stav's model ids. Copy the context window from the model's page in the catalogue.
Check it:
openclaw agent exec "Reply with exactly: STAV OK"
Or let the wizard write it
openclaw onboard can write the provider for you:
export CUSTOM_API_KEY=$STAV_API_KEY
openclaw onboard --non-interactive --accept-risk --skip-health \
--auth-choice custom-api-key \
--custom-base-url https://api.stav.ai/v1 \
--custom-model-id zai-org/glm-5-2/scaleway-generative-apis \
--custom-provider-id stav \
--custom-compatibility openai \
--secret-input-mode ref
It stores the key as a reference to CUSTOM_API_KEY, not as text. It guesses a context window of 128,000 and an output cap of 4,096 tokens. Correct both in openclaw.json afterwards.
Pick a model
| You send | What happens |
|---|---|
creator/model/provider, e.g. zai-org/glm-5-2/scaleway-generative-apis | One Provider Endpoint, here in Paris. Use this to know where the work runs |
creator/model, e.g. zai-org/glm-5-2 | Stav picks one of the model's Provider Endpoints. Without a region policy that can be outside the EU |
auto | Your default Router picks a model per request |
anthropic/…, openai/…, xai/… | Works, and is forwarded to that US provider. Stav adds governance, not EU compute |
Add each one you want as an entry under models. Switch for one run with --model stav/<model id>.
To keep everything in the EU, set Compute region to EU only in Your workspace → Govern → Key policies → Reach. That applies to every request from every key, including auto and models you name. See Enforce a sovereignty floor.
Reasoning level
OpenClaw sends a reasoning level (--thinking low|medium|high) only when the model entry has reasoning: true and compat: { supportsReasoningEffort: true }. Without the compat line it leaves the level out, and the model uses its own default. Add the line only for models that reason.
What works
| Feature | Status |
|---|---|
| Chat, streaming | Works |
| Tool calls (file edits, shell, the full agent loop) | Works |
Reasoning level (--thinking) | Works with the compat line above |
auto | Works |
| Claude models | Work, forwarded to Anthropic |
api: "anthropic-messages" with baseUrl: "https://api.stav.ai" | Works. OpenClaw adds /v1/messages itself |
Traffic that does not go through Stav
- Update check. OpenClaw asks
telemetry.openclaw.aifor the latest version once a day. Turn it off withupdate: { checkOnStart: false }inopenclaw.json. - Feature statistics are off unless you opt in (
telemetry.enabled). - Chat apps. Messages you send through Telegram, WhatsApp, Slack and the other channels pass through those services before they reach OpenClaw.
Troubleshooting
| You see | Do this |
|---|---|
404 on every request | baseUrl must end in /v1: https://api.stav.ai/v1 |
Couldn't sign in to the AI service | Stav answered 401 Invalid or revoked API key. Check STAV_API_KEY |
Inline API key for provider "stav" is temporarily disabled | After a 401, OpenClaw pauses the key for about a minute, even once you fix it. Wait, then try again |
| A request ran outside the EU | Pin the endpoint (creator/model/provider) or set Compute region in Your workspace → Govern → Key policies → Reach |
More error codes: Errors.
Check it worked
Open Your workspace → Monitor → Request log. Each agent turn is one row, with the model, Inference Provider, country and cost. See Request log and prompt capture.