Generate Your PRD Free — No account required
Try PRD Generator →

Bring Your Own Key (BYOK)

BYOK allows you to use your own API keys from providers like OpenAI, Anthropic, and Google. This gives you unlimited usage without consuming platform credits, plus enhanced data privacy.

Why Use BYOK?

BenefitDescription
Unlimited UsagePay your provider directly. No per-doc credits.
Data IsolationYour prompts go directly to your provider account.
Cost ControlUse your existing enterprise agreements or free tiers.
Model SelectionAccess any model your provider offers (including fine-tuned).

Supported Providers

ProviderModelsSetup
OpenAIGPT-4, GPT-4o, GPT-4o-miniAPI Key from platform.openai.com
AnthropicClaude 3.5 Sonnet, Claude 3 OpusAPI Key from console.anthropic.com
Google AIGemini 2.0 Flash, Gemini 1.5 ProAPI Key from aistudio.google.com
GroqLlama 3.1 70B, MixtralAPI Key from console.groq.com

Security Architecture

Your API keys are never stored in plain text. Context Ark uses industry-standard encryption:

text
1┌─────────────────────────────────────────────────────────┐
2│ Your API Key │
3│ │ │
4│ ▼ │
5│ ┌─────────────────────────────────────────────────┐ │
6│ │ AES-256-GCM Encryption │ │
7│ │ (Server-side, per-user key derivation) │ │
8│ └─────────────────────────────────────────────────┘ │
9│ │ │
10│ ▼ │
11│ ┌─────────────────────────────────────────────────┐ │
12│ │ Encrypted Storage (Supabase) │ │
13│ │ Key only decrypted at call time │ │
14│ └─────────────────────────────────────────────────┘ │
15└─────────────────────────────────────────────────────────┘

Key Security Guarantees

  1. AES-256-GCM: Military-grade symmetric encryption
  2. Per-User Derivation: Each user has a unique encryption context
  3. Zero Logging: BYOK requests are not logged to our analytics
  4. Ephemeral Decryption: Keys are decrypted in memory only during API calls

How to Add Your Keys

  1. Navigate to Settings > API Keys in your dashboard
  2. Select your provider (OpenAI, Anthropic, Google, Groq)
  3. Paste your API key in the secure input field
  4. Click Save & Verify

[!WARNING] Never share your API keys. If you suspect a key has been compromised, rotate it immediately in your provider's dashboard.

Usage Billing

When BYOK is enabled:

  • Kernel Builds: 0 credits (billed to your provider)
  • Doc Generation: 0 credits (billed to your provider)
  • Single Doc Regen: 0 credits (billed to your provider)

You still need a Context Ark account, but you won't consume platform credits for LLM operations.

Switching Back to Platform Credits

To use Context Ark's credits instead of your own key:

  1. Go to Settings > API Keys
  2. Click Remove next to your saved key
  3. Your account will default back to platform credit billing