Skip to main content
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.
BYOK is available on the Max plan.

Supported providers

ProviderEnv variableWorks with
AnthropicANTHROPIC_API_KEYClaude Code, OpenCode
OpenAIOPENAI_API_KEYCodex, OpenCode
Google AIGOOGLE_GENERATIVE_AI_API_KEYOpenCode
OpenRouterOPENROUTER_API_KEYOpenCode

Setup

1

Go to Settings

Navigate to Settings > Bring Your Own Keys in your workspace.
2

Add a provider key

Select the provider, paste your API key, and save. You can add keys for multiple providers.
3

Create a task

When you create a task, select an agent and model supported by your configured provider. Twill routes the request directly to the provider using your key.

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.