RelayGPU Logo
Workspace
Playground
Models
Account
Profile
Keys
Usage
Tasks
Credits
Earn
Affiliate
Integrations
OpenClaw
OpenClaw
NemoClaw
NemoClaw
Resources
Docs
Connect
Integration Guide

OpenClaw + RelayGPU

Connect AI coding agents to RelayGPU's unified API. Use Claude and GPT models through OpenClaw with a single configuration.


1Install OpenClaw

npm install -g openclaw

2Run the Onboarding Wizard

Run the onboarding wizard, or use openclaw configure to reconfigure an existing install:

# first-time setup openclaw onboard # reconfigure existing install openclaw configure

Follow these steps in the wizard:

  1. 1Onboarding mode — Select QuickStart.
  2. 2Gateway bind address — Select Loopback (127.0.0.1).
  3. 3Auth method — Select Custom Provider / API Key.
  4. 4Base URL — Enter the RelayGPU endpoint (see table below).
  5. 5API key — Paste your key from Dashboard → Keys.
  6. 6Compatibility mode — Select the format matching your model (see table below).
  7. 7Model — Select your model (see table below).

Base URLs

ProviderBase URL
Anthropic (Claude)https://relay.opengpu.network/v2/anthropic/v1
OpenAI-compatiblehttps://relay.opengpu.network/v2/openai/v1

Available Models

ModelProviderCompatibility
anthropic/claude-opus-4-6Anthropicanthropic-messages
anthropic/claude-sonnet-4-6Anthropicanthropic-messages
See all modelsOpenAIopenai-completions

3Update Context Window

Open the config file and set these values on each model entry:

Windows C:\Users\<YourName>\.openclaw\openclaw.json
Linux ~/.openclaw/openclaw.json
"contextWindow": 400000, "maxTokens": 128000

Important: Without this, OpenClaw may truncate long conversations. Apply to every model block inside models.providers.


4Full Config Example

Below is an example of how the relevant parts of openclaw.json should look when configured for RelayGPU.

{ "models": { "mode": "merge", "providers": { "relaygpu": { "baseUrl": "https://relay.opengpu.network/v2/anthropic/v1", "apiKey": "YOUR_RELAYGPU_API_KEY", "api": "anthropic-messages", "models": [ { "id": "anthropic/claude-sonnet-4-6", "name": "anthropic/claude-sonnet-4-6 (Custom Provider)", "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 400000, "maxTokens": 128000 } ] } } }, "agents": { "defaults": { "model": { "primary": "relaygpu/anthropic/claude-sonnet-4-6" }, "models": { "relaygpu/anthropic/claude-sonnet-4-6": {} } } } }

5Start the Gateway

openclaw gateway

Then open your browser and go to:

http://localhost:18789

When prompted, enter the gateway token from your config file. You can find it at:

Windows C:\Users\<YourName>\.openclaw\openclaw.json
Linux ~/.openclaw/openclaw.json

Note: Look for gateway.auth.token in the config file. Treat it like a password.