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?
| Benefit | Description |
|---|---|
| Unlimited Usage | Pay your provider directly. No per-doc credits. |
| Data Isolation | Your prompts go directly to your provider account. |
| Cost Control | Use your existing enterprise agreements or free tiers. |
| Model Selection | Access any model your provider offers (including fine-tuned). |
Supported Providers
| Provider | Models | Setup |
|---|---|---|
| OpenAI | GPT-4, GPT-4o, GPT-4o-mini | API Key from platform.openai.com |
| Anthropic | Claude 3.5 Sonnet, Claude 3 Opus | API Key from console.anthropic.com |
| Google AI | Gemini 2.0 Flash, Gemini 1.5 Pro | API Key from aistudio.google.com |
| Groq | Llama 3.1 70B, Mixtral | API 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
- AES-256-GCM: Military-grade symmetric encryption
- Per-User Derivation: Each user has a unique encryption context
- Zero Logging: BYOK requests are not logged to our analytics
- Ephemeral Decryption: Keys are decrypted in memory only during API calls
How to Add Your Keys
- Navigate to Settings > API Keys in your dashboard
- Select your provider (OpenAI, Anthropic, Google, Groq)
- Paste your API key in the secure input field
- 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:
- Go to Settings > API Keys
- Click Remove next to your saved key
- Your account will default back to platform credit billing
