This page documents how Clawd uses Rigbox’s general-purpose AI and configuration APIs to power its bot hosting experience. These are not Clawd-specific APIs - they’re available to any Rigbox integration.Documentation Index
Fetch the complete documentation index at: https://docs.rigbox.dev/llms.txt
Use this file to discover all available pages before exploring further.
APIs used by Clawd’s runtime
| API | How Clawd uses it | Guide |
|---|---|---|
AI Config (PUT /workspaces/{id}/ai-config) | Sets managed/BYOK mode, provider, and model for each bot workspace | Managed Proxy, BYOK |
| Managed AI Proxy | Routes AI SDK calls through Rigbox’s proxy so bot workspaces don’t need API keys | Managed Proxy |
Credits (GET /users/me/credits) | Displays credit balance in the Clawd dashboard | Resource Limits |
AI Usage (GET /users/me/ai-usage) | Shows per-day, per-workspace usage breakdown | Managed Proxy |
AI Defaults (PUT /users/me/ai-defaults) | Lets users set default provider/model for new bot workspaces | BYOK |
How the managed proxy powers Clawd bots
When a Clawd bot workspace is in managed mode:- The bot’s code calls the AI SDK (e.g., Anthropic, OpenAI) using standard endpoints
- The workspace’s proxy configuration routes these calls through Rigbox’s bridge-local AI proxy
- The proxy injects the real provider API key - the bot workspace never sees it
- Token usage is metered and deducted from the user’s credit balance
- If credits run out, requests return
402and the Clawd UI prompts an upgrade
The managed AI proxy is a general Rigbox feature, not Clawd-specific. Any workspace can use it by setting
mode: "managed" via the AI Config API, then running eval "$(rig proxy on)" or sourcing ~/.rigbox/proxy.env inside the VM.AI config fields
ThePUT /workspaces/{id}/ai-config endpoint accepts:
| Field | Type | Description |
|---|---|---|
mode | "managed" or "byok" | Proxy mode |
provider | "google", "openai", "anthropic" | AI provider |
api_key | string or null | BYOK provider key (null to clear) |
model | string or null | Model identifier (null to clear) |
- Omitted fields keep their current value
- Set a field to
nullto clear it - Unknown fields are rejected with
400
Building something similar
If you’re building your own AI-powered hosting platform on Rigbox, the same APIs that power Clawd are available to you. See:- Build a Hosting Platform - end-to-end tutorial
- Clawd API Surface - full endpoint map of what Clawd calls
- Managed AI Proxy - detailed proxy and credit guide