Spaces:
Running
Running
docs: add OpenClaw / ClawdBot integration guide
Browse filesAdd documentation for configuring OpenClaw (formerly ClawdBot/Moltbot)
to use this proxy for Claude and Gemini models via messaging apps.
Includes:
- Full config.json example with all supported models
- VPS security guidance (HOST=127.0.0.1 binding)
- Troubleshooting section
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Files changed (2)
- README.md+2-1
- docs/openclaw.mdAdded+159
3 unmodified lines45678910257 unmodified lines2682692702712722733 unmodified lines[](https://www.npmjs.com/package/antigravity-claude-proxy)[](https://opensource.org/licenses/MIT)A proxy server that exposes an **Anthropic-compatible API** backed by **Antigravity's Cloud Code**, letting you use Claude and Gemini models with **Claude Code CLI**.257 unmodified lines- [Web Management Console](docs/web-console.md)- [Advanced Configuration](docs/configuration.md)- [macOS Menu Bar App](docs/menubar-app.md)- [API Endpoints](docs/api-endpoints.md)- [Testing](docs/testing.md)- [Troubleshooting](docs/troubleshooting.md)3 unmodified lines45678910257 unmodified lines2682692702712722732743 unmodified lines[](https://www.npmjs.com/package/antigravity-claude-proxy)[](https://opensource.org/licenses/MIT)A proxy server that exposes an **Anthropic-compatible API** backed by **Antigravity's Cloud Code**, letting you use Claude and Gemini models with **Claude Code CLI** and **OpenClaw / ClawdBot**.257 unmodified lines- [Web Management Console](docs/web-console.md)- [Advanced Configuration](docs/configuration.md)- [macOS Menu Bar App](docs/menubar-app.md)- [OpenClaw / ClawdBot Integration](docs/openclaw.md)- [API Endpoints](docs/api-endpoints.md)- [Testing](docs/testing.md)- [Troubleshooting](docs/troubleshooting.md)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159# Using with OpenClaw / ClawdBot
[OpenClaw](https://docs.openclaw.ai/) (formerly ClawdBot/Moltbot) is an AI agent gateway that connects to messaging apps like Telegram, WhatsApp, Discord, Slack, and iMessage. You can configure it to use this proxy for Claude and Gemini models.
## Prerequisites
- OpenClaw installed (`npm install -g openclaw@latest`)- Antigravity Claude Proxy running on port 8080- At least one Google account linked to the proxy
## Configure OpenClaw
Edit your OpenClaw config file at:- **macOS/Linux**: `~/.openclaw/openclaw.json`- **Windows**: `%USERPROFILE%\.openclaw\openclaw.json`
Add the following configuration:
```json{ "models": { "mode": "merge", "providers": { "antigravity-proxy": { "baseUrl": "http://127.0.0.1:8080", "apiKey": "test", "api": "anthropic-messages", "models": [ { "id": "gemini-3-flash", "name": "Gemini 3 Flash", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 1048576, "maxTokens": 65536 }, { "id": "gemini-3-pro-high", "name": "Gemini 3 Pro High", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 1048576, "maxTokens": 65536 }, { "id": "claude-sonnet-4-5", "name": "Claude Sonnet 4.5", "reasoning": false, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 200000, "maxTokens": 16384 }, { "id": "claude-sonnet-4-5-thinking", "name": "Claude Sonnet 4.5 Thinking", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 200000, "maxTokens": 16384 }, { "id": "claude-opus-4-5-thinking", "name": "Claude Opus 4.5 Thinking", "reasoning": true, "input": ["text", "image"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, "contextWindow": 200000, "maxTokens": 32000 } ] } } }, "agents": { "defaults": { "model": { "primary": "antigravity-proxy/gemini-3-flash", "fallbacks": ["antigravity-proxy/gemini-3-pro-high"] }, "models": { "antigravity-proxy/gemini-3-flash": {} } } }}```
> **Important**: Use `127.0.0.1` instead of `localhost` in the `baseUrl`. This ensures the connection stays on the loopback interface. If you're running on a VPS and accidentally start the proxy bound to `0.0.0.0`, using `localhost` in your client config could still work but `127.0.0.1` makes the intent explicit and avoids potential DNS resolution issues.
## Start Both Services
```bash# Terminal 1: Start the proxy (binds to localhost only by default)antigravity-claude-proxy start
# Terminal 2: Start OpenClaw gatewayopenclaw gateway```
## Verify Configuration
```bash# Check available modelsopenclaw models list
# Check gateway statusopenclaw status```
You should see models prefixed with `antigravity-proxy/` in the list.
## Switch Models
To change the default model:
```bashopenclaw models set antigravity-proxy/claude-opus-4-5-thinking```
Or edit the `model.primary` field in your config file.
## Troubleshooting
### Connection Refused
Make sure the proxy is running before starting OpenClaw:```bashcurl http://127.0.0.1:8080/health```
### Models Not Showing
1. Verify the config file is valid JSON2. Check that `mode` is set to `"merge"` (not `"replace"` unless you want to override all built-in models)3. Restart the OpenClaw gateway after config changes
### VPS Security
If running on a VPS, ensure the proxy only binds to localhost:```bash# Default binds to 0.0.0.0 (all interfaces) - exposed to network!antigravity-claude-proxy start
# Explicitly bind to localhost only (recommended for VPS)HOST=127.0.0.1 antigravity-claude-proxy start```
By default, the proxy binds to `0.0.0.0` which exposes it to all network interfaces. On a VPS, always use `HOST=127.0.0.1` to restrict access to localhost only, or ensure you have proper authentication (`API_KEY` env var) and firewall rules in place.
## Further Reading
- [OpenClaw Documentation](https://docs.openclaw.ai/)- [OpenClaw Configuration Reference](https://docs.openclaw.ai/gateway/configuration)- [Proxy Load Balancing](./load-balancing.md)- [Proxy Configuration](./configuration.md)README.md+2-1
docs/openclaw.mdAdded+159