Bring Your Own Keys (BYOK) lets you connect your own API keys from AI providers. When BYOK is enabled, agent requests go directly to the provider instead of through Twill’s proxy. You pay the provider at their standard rates and Twill does not bill for AI usage.Documentation Index
Fetch the complete documentation index at: https://docs.twill.ai/llms.txt
Use this file to discover all available pages before exploring further.
BYOK is available on the Max plan.
Supported providers
| Provider | Env variable | Works with |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY | Claude Code, OpenCode |
| OpenAI | OPENAI_API_KEY | Codex, OpenCode |
| Google AI | GOOGLE_GENERATIVE_AI_API_KEY | OpenCode |
| OpenRouter | OPENROUTER_API_KEY | OpenCode |
Setup
Add a provider key
Select the provider, paste your API key, and save. You can add keys for multiple providers.
Good to know
- BYOK usage is tracked in Twill for visibility, but you are not billed for it through Twill. Set spending limits directly with your provider.
- Sandbox compute is still covered by your Twill plan.
- If you select an agent and model that requires a provider you have not configured, the task falls back to Twill’s platform credits.