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

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

Switch to Official API mode

Select the 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. It never leaves your machine unencrypted.
5

Validate the key

Click Validate 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

To remove a saved API key, open the provider’s configuration and click Clear key. This deletes the encrypted key from local storage and reverts the provider to stagewise proxy mode.

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 proxy
  • Google → Custom endpoint (self-hosted)
The agent uses whichever mode is configured for the provider of the currently selected model.