OpenClaw Integration with The Grid | Custom Backend Setup
Set up OpenClaw with The Grid as a custom OpenAI-compatible backend. Add a provider, allowlist instruments, and restart the gateway.
Prerequisites
Setup
1. Store your Grid key
THEGRID_API_KEY=your-consumption-api-key2. Add The Grid to openclaw.json
openclaw.json{
"gateway": { "mode": "local" },
"models": {
"mode": "merge",
"providers": {
"thegrid": {
"baseUrl": "https://api.thegrid.ai/v1",
"apiKey": "${THEGRID_API_KEY}",
"api": "openai-completions",
"models": [
{ "id": "code-prime", "name": "Code Prime", "reasoning": true, "input": ["text"], "contextWindow": 128000, "maxTokens": 128000 },
{ "id": "code-max", "name": "Code Max", "reasoning": true, "input": ["text"], "contextWindow": 1000000, "maxTokens": 128000 },
{ "id": "agent-prime", "name": "Agent Prime", "reasoning": true, "input": ["text"], "contextWindow": 256000, "maxTokens": 128000 }
]
}
}
}
}3. Add instruments to the model allowlist
4. Install or restart the gateway
Verification
Troubleshooting
Last updated
Was this helpful?