Skip to main content
OpenClaw is a personal AI assistant you run on your own devices, accessible via Telegram, WhatsApp, Discord, Signal, iMessage, and more. It supports many model providers — RuAPI plugs in via either the Anthropic-compatible or OpenAI-compatible protocol.

Prerequisites

1

RuAPI account + API key

Console → TokensCreate token. See API keys & security.
2

Node.js ≥ 18

Install from nodejs.org if missing.
3

OS

Native macOS and Linux. On Windows, use WSL2.

Install OpenClaw

Confirm:

Configure RuAPI

OpenClaw uses the Anthropic SDK under the hood, so the simplest setup is ANTHROPIC_BASE_URL + ANTHROPIC_API_KEY env vars plus a model selection in ~/.openclaw/openclaw.json.
1

Run onboarding to create the config directory

Walk through the wizard. When it asks for a model provider, pick anything (e.g. Anthropic API key) with a placeholder key — you’ll overwrite it next. This step exists to create ~/.openclaw/ and the initial config.
2

Edit openclaw.json

Open ~/.openclaw/openclaw.json (create if missing) and set:
Don’t append /v1 to ANTHROPIC_BASE_URL.
3

Restart the gateway

If you installed it as a daemon:
Or start it manually:

Method 2: shell env vars

If you’d rather not edit the config file, set the vars in your shell:
Add these to ~/.zshrc or ~/.bashrc:
Then source the file or open a new terminal.
You still need agents.defaults.model in openclaw.json, otherwise OpenClaw will prompt you to pick a model on every run.

First call

Send one message:
You should get a reply, and the RuAPI Console → 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:
OpenClaw uses <provider>/<model-id> naming. Common options: Full list at the pricing page.

Troubleshooting

  • ANTHROPIC_API_KEY must be your RuAPI token (sk-...), not Anthropic’s official key.
  • Confirm the key is enabled and the model is in any allowlist via RuAPI Console → Tokens.
  • The model ID must include the anthropic/ prefix, e.g. anthropic/claude-sonnet-5.
  • Don’t add /v1 to ANTHROPIC_BASE_URL.
  • 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.
OpenClaw’s models.providers config supports fallback chains. Get RuAPI working first, then layer fallbacks per the OpenClaw configuration docs.
Define a custom provider in openclaw.json:

Advanced: channels

OpenClaw’s main value is “use Claude via your messaging app.” With RuAPI configured, wire up Telegram / Discord / Signal per the OpenClaw channels docs — model calls route through RuAPI automatically.