Prerequisites
1
RuAPI account + API key
Console → API Keys → Create API key. See API keys & security.
2
Node.js ≥ 24.16
OpenClaw needs Node.js 24.16 or newer (Node 26 recommended). Check with:Install from nodejs.org if missing.
3
OS
Native macOS and Linux. On Windows, use WSL2.
Install OpenClaw
npm install -g openclaw@latest --allow-scripts=openclaw.
Confirm:
Configure RuAPI
OpenClaw uses the Anthropic SDK under the hood, so the simplest setup isANTHROPIC_BASE_URL + ANTHROPIC_API_KEY env vars plus a model selection in ~/.openclaw/openclaw.json.
Method 1: env + config file (recommended)
1
Run onboarding to create the config directory
~/.openclaw/ and the initial config.2
Edit openclaw.json
Open
~/.openclaw/openclaw.json (create if missing) and set:3
Restart the gateway
If you installed it as a daemon:Or restart it manually:
Method 2: shell env vars
If you’d rather not edit the config file, set the vars in your shell:- macOS / Linux
- WSL2
Add these to Then
~/.zshrc or ~/.bashrc:source the file or open a new terminal.agents.defaults.model in openclaw.json, otherwise OpenClaw will prompt you to pick a model on every run.
First call
Open a chat right in the terminal and ask it to say hi in one sentence:openclaw dashboard and send a message there.
You should get a reply, and the RuAPI Console → Usage Logs should show a claude-sonnet-5 (or whatever you set) call.
Once you’ve wired up Telegram / Discord / etc., messages on those channels will route through RuAPI too.
Choosing a different model
Edit~/.openclaw/openclaw.json:
<provider>/<model-id> naming. Common options:
Full list at the pricing page.
Troubleshooting
Model not found (503) or 404
Model not found (503) or 404
- The model ID must include the
anthropic/prefix, e.g.anthropic/claude-sonnet-5. - Don’t add
/v1toANTHROPIC_BASE_URL.
openclaw onboard hangs or spins
openclaw onboard hangs or spins
- Check connectivity:
curl -I https://www.ruapi.ai. - Cancel onboarding (Ctrl+C) and hand-edit
~/.openclaw/openclaw.json— the next start will use that file.
Configure multiple providers for failover
Configure multiple providers for failover
OpenClaw’s
models.providers config supports fallback chains. Get RuAPI working first, then layer fallbacks per the OpenClaw configuration docs.Use the OpenAI-compatible protocol instead
Use the OpenAI-compatible protocol instead
Define a custom provider in
openclaw.json: