BYOK Guide
Discover how Bring Your Own Key (BYOK) allows you to access advanced AI models by providing your own API keys.
What is BYOK?
Bring Your Own Key (BYOK) is a feature that enables you to use premium and advanced AI models by supplying your own API keys from external providers. This unlocks access to powerful models that require authentication through your personal API credentials, giving you more control and flexibility in your AI interactions.
💡 BYOK is perfect for users who already have subscriptions to AI providers like OpenAI, Anthropic, or others and want to leverage their existing keys within Chat LLM.
How BYOK Works
When you select a BYOK-enabled model in the chat interface, Chat LLM will use your provided API key to authenticate and route requests to the external provider. This means you get the full capabilities of the model while maintaining privacy and control over your usage and costs.
- Your API key is securely stored in your Chat LLM profile
- When you choose a BYOK model, the system uses your key for authentication
- Requests are forwarded to the provider's API with your credentials
- Responses are returned to Chat LLM and displayed in your conversation
Setting Up BYOK
Getting started with BYOK is simple and secure:
1. Obtain Your API Key
Sign up with your preferred AI provider (like OpenAI, Anthropic, or Google) and generate an API key from their developer console.
2. Add Key to Chat LLM
Go to your Profile Settings, navigate to the API Keys section, click 'Add Key' for the corresponding provider, enter your API key and save securely.
3. Select BYOK Models
In the model selection dropdown, look for models marked with '🔑 BYOK Required'. These are the advanced models you can now access.
4. Start Chatting
Once configured, select your BYOK model and start chatting with full access to premium AI capabilities.
Special Cases: oauth_creds.json Models
Some advanced models like Qwen Code, Gemini CLI, and Claude Code require a special oauth_creds.json file instead of a traditional API key. This file contains your OAuth credentials for authentication.
Qwen Code
Default path: %USERPROFILE%\.qwen\oauth_creds.json works automatically.
Or specify a custom credentials path if needed. Create the oauth_creds.json file with your Qwen OAuth credentials and paste its content into the Chat LLM settings.
Gemini CLI
Default path: %USERPROFILE%\.gemini\oauth_creds.json
Paste your oauth_creds.json content here. You can also add a 'projectId' key to specify your Google Cloud project. Create the file in the specified path or paste the JSON content directly into Chat LLM settings.
Claude Code
Default path: %USERPROFILE%\.claude\oauth_creds.json
On Windows: %USERPROFILE%\.claude\oauth_creds.json. Create the oauth_creds.json file with your Claude OAuth credentials and either place it in the default path or paste its content into Chat LLM settings.
💡 Tip: For these special models, you'll see a textarea in the API key settings where you can paste the entire JSON content of your oauth_creds.json file. No need to worry about file paths - just copy and paste the JSON content directly.
Benefits of BYOK
- Access Premium Models: Use cutting-edge AI models without additional subscription costs through Chat LLM
- Cost Control: Manage your own usage and billing directly with the provider
- Privacy: Your API keys and usage remain under your control
- Flexibility: Switch between models and providers easily within the same interface
- Enhanced Features: Combine BYOK models with RAG, Memory, MCP Servers, and other Chat LLM features
Supported BYOK Models
Chat LLM supports BYOK for all models from leading providers.
Security & Privacy
Your API keys are stored securely in Chat LLM and encrypted at rest. We never share your keys with third parties or use them for any purpose other than authenticating your requests to the respective AI providers.
- Keys are only used for the specific provider you configured
- You can view, update, or remove keys at any time from your profile
- Usage logs show which models and providers were accessed with your keys
- Your conversation data remains private and is not shared with external providers unless you explicitly use BYOK
Troubleshooting
Common Issues
- Invalid Key Error: Check that your API key is correct and active in the provider's console
- Rate Limit Exceeded: This is managed by your provider subscription; upgrade your plan if needed
- Model Not Available: Ensure the model is supported by your provider and your key has access
Getting Help
If you encounter issues with BYOK setup or usage, check your profile settings or contact support. Remember that API key management is handled through your provider's dashboard for billing and usage details.