← Docs/Integrations/OpenClaw

OpenClaw Integration

Connect OauthRouter to OpenClaw as a custom OpenAI-compatible provider. Takes under 1 minute.

Quick reference

Provider type: OpenAI-compatible
Base URL: https://api.oauthrouter.com/v1
API Key: lr_live_YOUR_TOKEN
Model: anthropic/claude-sonnet-4-5

Prerequisites

  • OauthRouter account — free tier gives 100 messages/month (sign up)
  • At least one provider configured in Providers (paste your Anthropic, OpenAI or other API key)
  • OpenClaw installed

Step-by-step

1

Get your API token

Go to oauthrouter.com/dashboard/api

In Your API Token, click Reveal and then Copy. The token starts with lr_live_.

Security: Keep this token private. If leaked, click Regenerate token to invalidate the old one.
2

Open OpenClaw settings

In OpenClaw, navigate to Settings → Providers → Add Custom Provider.

Choose the provider type:

  • OpenAI-compatible, or
  • Custom OpenAI

Both options work the same way.

3

Fill in the fields

FieldValue
NameOauthRouter
Base URLhttps://api.oauthrouter.com/v1
API Keylr_live_YOUR_TOKEN
Default Modelanthropic/claude-sonnet-4-5

Click Save.

4

Test the connection

Create a new conversation in OpenClaw and select OauthRouter as the provider.

Pick a model:

  • anthropic/claude-sonnet-4-5 — balanced (recommended)
  • anthropic/claude-haiku-4-5 — fast and cheap
  • anthropic/claude-opus-4-6 — smartest (but slow, 60+ seconds)

Send any message. If the model responds, you're connected.

5

Adjust timeout for slow models

Claude Opus 4.6 can take 60+ seconds for long responses. If using Opus, increase the OpenClaw client timeout:

Settings → Advanced → Request timeout → 120 seconds

For Sonnet and Haiku, the default 30 second timeout is fine.

Available models

The models you can use depend on which providers you configured in Dashboard → Providers. For example, if you only added Anthropic, only Claude models will work.

Check your available models dynamically:

cURL
curl https://api.oauthrouter.com/v1/models \
  -H "Authorization: Bearer lr_live_YOUR_TOKEN"

Troubleshooting

ErrorCauseSolution
401 authentication_errorToken invalid or expiredGo to /dashboard/api and click Regenerate token
400 No enabled provider foundUsing a model from a provider you have not configuredAdd the provider (e.g. OpenAI) in /dashboard
429 Monthly message limit reachedReached your plan quotaUpgrade plan or wait until month reset (1st)
timeoutSlow model + short client timeoutSet OpenClaw timeout to 120s+
Connection refused / DNS errorWrong Base URLMust be https://api.oauthrouter.com/v1 (with api. subdomain)
All models failed: 522Cloudflare reached timeout limitTry again in a few seconds or use Haiku instead of Opus

Model recommendations

anthropic/claude-haiku-4-5Fastest

Best for quick responses, simple tasks, cheap. ~1-3 seconds per response.

anthropic/claude-sonnet-4-5Recommended

Best balance of speed and intelligence for most tasks. ~3-10 seconds.

anthropic/claude-opus-4-6Smartest

Best for complex reasoning and coding. Slow — 30-90 seconds. Requires 120s+ timeout.