APIs used by Clawd’s runtime
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 Workspace AI Mode API, then running eval "$(rig proxy on)" or sourcing ~/.rigbox/proxy.env inside the VM.AI config fields
AI configuration is split across two endpoints. A workspace’s mode is set withPUT /workspaces/{id}/mode:
Provider and model are account-level defaults, set with
PUT /users/me/ai-defaults:
In BYOK mode, supply your provider key to the workspace as an environment variable (e.g.
ANTHROPIC_API_KEY) via POST /workspaces/{id}/env — there is no api_key config field.
- Omitted fields keep their current value
- Set a field to
nullto clear it
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