Bring Your Own Keys (BYOK) mode lets you use your own AI provider API keys with Rigbox workspaces. Your keys are stored securely and injected into the workspace runtime - you get unlimited usage billed directly by your provider, with no Rigbox credit limits.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.
Managed mode routes traffic through Rigbox’s OpenRouter gateway and meters it against your credit balance. BYOK skips OpenRouter entirely and connects your workspace directly to the provider you specify, using the key you supply.
When to Use BYOK
BYOK is the right choice when:- You already have API keys from Anthropic, OpenAI, Google, or another provider
- You need unlimited usage beyond the managed credit tiers
- You need a specific model not available in managed mode
- Your organization requires that API keys stay under your own provider account for billing, audit, or compliance reasons
Set BYOK Mode
Configure a workspace to use your own API key by setting the AI config tobyok mode.
How Keys Are Stored and Injected
When you set a BYOK key:- Encrypted at rest - the key is encrypted before being written to the database
- Injected at runtime - when the workspace starts, the key is injected as an environment variable inside the VM
- Never logged - keys are redacted from all request logs and audit trails
- Scoped to the workspace - each workspace has its own AI config; changing one does not affect others
OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY).
Clear a Key
To remove an API key from a workspace without changing the mode:api_key to null removes the stored key. The workspace will no longer have access to the provider until you set a new key.
Switch Back to Managed Mode
You can switch from BYOK to managed mode at any time. This clears the stored key and starts using Rigbox-managed credits instead.Switching modes takes effect on the next AI API call - no workspace restart required.
Set Defaults for New Workspaces
If you use the same provider and key across most of your workspaces, set a default so new workspaces inherit your BYOK configuration automatically.Managed vs. BYOK Comparison
| Feature | Managed | BYOK |
|---|---|---|
| API keys required | No | Yes |
| Credit tracking | Automatic | N/A (billed by your provider) |
| Cost | Included credits (Free: 250, Pro: 2,000) | Your provider billing |
| Supported providers | Anthropic, OpenAI, Google, Brave | Any supported provider |
| Usage limits | Credit balance | Your provider’s rate limits |
| Setup time | Instant | Need existing API key |
| Best for | Quick start, prototyping, demos | Production, high volume, specific models |
Provider-Specific Examples
Anthropic (Claude)
OpenAI (GPT)
Google (Gemini)
Security Best Practices
- Rotate keys regularly - update the key via the ai-config endpoint; no workspace restart needed
- Use scoped keys - if your provider supports project-scoped or restricted keys, prefer those over organization-wide keys
- Audit usage - monitor your provider dashboard for unexpected usage patterns
- One key per workspace - avoid sharing the same key across many workspaces; this makes it easier to revoke access to a single workspace
Next Steps
- Managed AI Proxy - use Rigbox-provided credits instead
- Setup Scripts - automate SDK installation in every workspace
- Service Specs - run AI-powered backend services automatically