RelayPlane + OpenClaw: One Environment Variable

Set ANTHROPIC_BASE_URL to point OpenClaw at RelayPlane and get automatic rate limit management, per-session cost tracking, and intelligent model routing — with zero code changes.

Why OpenClaw users add RelayPlane

  • Hitting Max rate limits? RelayPlane auto-fails over to a backup model so your session never hard-crashes on a 429.
  • Want cost visibility? Every OpenClaw call is logged to local SQLite with model, tokens, and exact dollar cost — no cloud required.
  • Want model routing? Simple tasks route to Haiku automatically. Complex ones escalate to Opus. Saves 40–60% on a typical OpenClaw spend.

Setup in 2 steps

No config files, no patches, no plugin. Just two commands.

1

Install RelayPlane

# Install globally
npm install -g @relayplane/proxy
# Start the local proxy
relayplane start
# Dashboard runs at localhost:4100
2

Point OpenClaw at RelayPlane

# Set before launching OpenClaw
export ANTHROPIC_BASE_URL=http://localhost:4100
# Run OpenClaw normally
openclaw

That is it. Every LLM call OpenClaw makes now flows through RelayPlane. Cost, model, and token count are logged locally. OpenClaw does not know or care.

What you get

Cost tracking per session

Every request logged to local SQLite — model, token count, and dollar cost. Queryable via the localhost:4100 dashboard.

Automatic failover on rate limits

Hit a 429? RelayPlane retries on a fallback model automatically. Your OpenClaw session keeps going.

Complexity-based model routing

Simple edits route to Haiku. Large context windows route to Opus. Configured once, applied to every call.

Zero code changes to OpenClaw

OpenClaw respects ANTHROPIC_BASE_URL natively. No fork, no plugin, no patch required.

OpenClaw without vs. with RelayPlane

FeatureWith RelayPlaneWithout RelayPlane
Rate limit management

When OpenClaw hits a Max rate limit, RelayPlane automatically retries on a fallback model or provider so your session keeps running.

Auto-failover on 429sHard error, session dies
Cost visibility

Every call OpenClaw makes is logged to local SQLite with the exact model, token count, and dollar cost. Review it in the localhost:4100 dashboard.

Per-request SQLite logNo visibility
Model routing

Simple tasks route to cheaper models like Haiku automatically. Large-context requests escalate to Opus. OpenClaw does not need to know about this.

Complexity-based routingSingle model always
Multi-provider fallback

When Anthropic is overloaded, RelayPlane can fall back to OpenAI or Gemini. OpenClaw continues without interruption.

Zero code changes

OpenClaw reads ANTHROPIC_BASE_URL from the environment. Point it at http://localhost:4100 and you are done.

One env varN/A

How it works under the hood

OpenClaw reads ANTHROPIC_BASE_URL from your environment and uses it as the Anthropic API endpoint. RelayPlane exposes a fully Anthropic-compatible HTTP server at localhost:4100. When OpenClaw sends a request, RelayPlane intercepts it, applies your routing rules, forwards it to the real provider, logs the metadata locally, and returns the response unchanged.

The entire stack runs on your machine. No data leaves your environment beyond the normal Anthropic API call. RelayPlane is MIT licensed with no telemetry.

Get started in 5 minutes

Install RelayPlane, set ANTHROPIC_BASE_URL, and your OpenClaw sessions get rate limit management, cost tracking, and model routing — no code changes required.

npm install -g @relayplane/proxy