Skip to main content

BYOK AI Integration

Bring Your Own Key (BYOK) lets you connect your own AI provider API key to BreakGround. All AI-powered requests are routed through your account, giving you full control over usage, billing, and model selection.

Supported Providers

ProviderIdentifierDescription
OpenAIOPENAIGPT models for content generation and optimization.
Google GeminiGEMINIGemini models for multilingual content and analysis.
Anthropic ClaudeCLAUDEClaude models for content suggestions and summarization.

Adding Your API Key

  1. Navigate to Settings > AI Configuration.
  2. Select your provider from the dropdown.
  3. Paste your API key into the key field.
  4. Click Save. BreakGround validates the key with a test request to the provider.

On success, the dashboard displays a masked version of your key (e.g., sk-...abcd). The full key is never displayed again after saving.

Key Encryption

Your API key is encrypted with AES-256-GCM before being stored in the database. Security details:

  • Encryption uses a per-company context to isolate keys across organizations.
  • The plaintext key is never written to logs or exposed via the API.
  • Only the last 4 characters are returned in API responses for identification.

Provider-Specific Configuration

Each provider accepts a standard API key:

  • OpenAI -- Generate a key at platform.openai.com. Ensure the key has access to the models you intend to use.
  • Google Gemini -- Create an API key in Google AI Studio. Enable the Generative Language API in your Google Cloud project.
  • Anthropic Claude -- Generate a key at console.anthropic.com. The key must have permissions for the Messages API.

Testing the Connection

After saving your key, click Test Connection to verify:

  • The key is valid and has not expired.
  • The provider responds within acceptable latency.
  • The key has sufficient permissions for AI operations.

A success or error message is displayed immediately.

Fallback Behavior

If your custom key fails during an AI operation (e.g., expired key, provider outage, or rate limiting), BreakGround automatically falls back to the system-provided AI key. This ensures AI features remain available to your team. A warning banner appears in the dashboard when the fallback is active so you can address the issue.

Removing Your Custom Key

To revert to the system-provided key:

  1. Go to Settings > AI Configuration.
  2. Click Remove Key.
  3. Confirm the action. BreakGround immediately switches to the system key.

Your encrypted key is deleted from storage. You can add a new key at any time.