Skip to main content
BYOK (Bring Your Own Key) lets you connect directly to LLM provider APIs using your own API keys. This gives you full control over billing, rate limits, and data routing.

Setup

1

Open provider settings

Navigate to Settings → Agent → Models & Providers.
2

Select a provider

Scroll to the provider you want to configure (e.g. Anthropic, OpenAI, Google).
3

Switch to "Use own API key with official API" mode

Select the **Use own API key with official API **endpoint mode. This routes requests directly to the provider’s API.
4

Enter your API key

Paste your API key into the input field and click Save.
Your API key is encrypted before being stored and not synchronized with your stagewise account. It never leaves your machine unencrypted.
5

Save and Validate the key

Click Save to verify the key works. stagewise sends a lightweight test request to confirm connectivity.

Where to get API keys

ProviderKey source
Anthropicconsole.anthropic.com → API Keys
OpenAIplatform.openai.com → API Keys
Googleaistudio.google.com → Get API Key
Moonshot AIplatform.moonshot.cn
Alibaba (Qwen)dashscope.console.aliyun.com

Removing a key

1

Open provider settings

Navigate to Settings → Agent → Models & Providers.
1

Select a provider

Scroll to the provider you want to configure (e.g. Anthropic, OpenAI, Google).
1

Click on "Clear"

This will permanently clear the key from your machine. 
1

Switch to "stagewise account" mode or re-configure BYOK

To continue using the models of the given provider, either switch back to Use my stagewise account mode, or re-configure BYOK. Otherwise, model calls will fail.

Mixing modes

Each provider is configured independently. You can use BYOK for one provider and the stagewise proxy for another. For example:
  • Anthropic → Official API (your key)
  • OpenAI → stagewise Account
  • Google → Custom endpoint (i.e. Vertex AI setup)
The agent uses whichever mode is configured for the provider of the currently selected model.