Connect AI coding agents to RelayGPU's unified API. Use Claude and GPT models through OpenClaw with a single configuration.
npm install -g openclawRun the onboarding wizard, or use openclaw configure to reconfigure an existing install:
# first-time setup
openclaw onboard
# reconfigure existing install
openclaw configureFollow these steps in the wizard:
| Provider | Base URL |
|---|---|
| Anthropic (Claude) | https://relay.opengpu.network/v2/anthropic/v1 |
| OpenAI-compatible | https://relay.opengpu.network/v2/openai/v1 |
| Model | Provider | Compatibility |
|---|---|---|
anthropic/claude-opus-4-6 | Anthropic | anthropic-messages |
anthropic/claude-sonnet-4-6 | Anthropic | anthropic-messages |
| See all models | OpenAI | openai-completions |
Open the config file and set these values on each model entry:
"contextWindow": 400000,
"maxTokens": 128000Important: Without this, OpenClaw may truncate long conversations. Apply to every model block inside models.providers.
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": {}
}
}
}
}openclaw gatewayThen open your browser and go to:
http://localhost:18789When prompted, enter the gateway token from your config file. You can find it at:
Note: Look for gateway.auth.token in the config file. Treat it like a password.