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 — FortAPI plugs in via either the Anthropic-compatible or OpenAI-compatible protocol.

Prerequisites

1

FortAPI 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 FortAPI

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 FortAPI Console → Logs should show a claude-sonnet (or whatever you set) call. Once you’ve wired up Telegram / Discord / etc., messages on those channels will route through FortAPI too.

Choosing a different model

Edit ~/.openclaw/openclaw.json:
OpenClaw uses <provider>/<model-id> naming, e.g. anthropic/your-model-name. Replace your-model-name with any model name from the pricing page on the main site. Full list on the Pricing page.

Troubleshooting

  • ANTHROPIC_API_KEY must be your FortAPI token (sk-...), not Anthropic’s official key.
  • Confirm the key is enabled and the model is in any allowlist via FortAPI Console → Tokens.
  • The model ID must include the anthropic/ prefix, e.g. anthropic/your-model-name.
  • Don’t add /v1 to ANTHROPIC_BASE_URL.
  • Check connectivity: curl -I https://www.fortapi.com.
  • 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 FortAPI 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 FortAPI configured, wire up Telegram / Discord / Signal per the OpenClaw channels docs — model calls route through FortAPI automatically.