BYOK Explained: Using Your Own API Keys for AI-Powered Editing
If you've used AI tools for writing, you've probably noticed the pricing models: per-word fees, credit systems, monthly limits. These models work for most users, but power users — authors revising multiple manuscripts, editors processing client work, writing groups sharing a tool — often hit the ceiling fast.
Bring Your Own Key (BYOK) is an alternative that gives you unlimited access at the actual cost of the AI model usage. Here's how it works.
What BYOK Means
BYOK stands for "Bring Your Own Key." Instead of paying us to use AI models on your behalf, you create your own account with the AI provider (Anthropic, OpenAI, or Google), get an API key, and plug it into Galleys. When you run an analysis, the AI calls go directly to your provider account, and you pay the provider directly at their standard rates.
The result: no per-analysis credit costs from Galleys. You pay only what the AI provider charges, which is typically a fraction of what credit-based pricing would cost for high-volume users.
Why BYOK Exists
We built BYOK because we noticed a clear divide in our user base:
Casual users want simplicity. They analyze a manuscript every few weeks, they don't want to manage API keys, and the credit system is easy to understand. For these users, Galleys' built-in credit system works perfectly.
Power users want control and cost efficiency. They're running multiple analyses per week, testing different models, iterating on revisions. For these users, the per-credit cost adds up. BYOK lets them pay wholesale instead of retail.
Both are valid use cases. BYOK gives power users the option without taking anything away from casual users.
How BYOK Works in Galleys
Setting up BYOK takes about two minutes:
Get an API key from your preferred provider:
- Anthropic (Claude models): console.anthropic.com → API Keys → Create Key
- OpenAI (GPT-4 models): platform.openai.com → API Keys → Create Key
- Google (Gemini models): aistudio.google.com → API Keys → Create Key
Add the key in Galleys: Go to Settings → API Keys → Add Key. Select the provider, paste your key, and save. Your key is encrypted with AES-256-GCM before storage — we never see or store the plaintext.
Enable BYOK per analysis: When you start an analysis, toggle "Use my API key" and select the model you want to use. BYOK users get access to premium models (like Claude Opus) that aren't available on standard credit plans.
That's it. The analysis runs exactly the same way — same editorial methodology, same structured report, same severity-tiered issues — but the AI calls are billed to your provider account.
Cost Comparison
Here's a rough comparison for analyzing a 80,000-word novel (approximately 20 chapters):
| Model | BYOK Cost (approx.) | Credit Cost |
|---|---|---|
| Claude Haiku | $0.50–$1.00 | 3 credits |
| Claude Sonnet | $3–$6 | 5 credits |
| GPT-4o | $3–$6 | 5 credits |
| Claude Opus | $15–$25 | BYOK only |
| Gemini 2.5 Pro | $3–$7 | 5 credits |
For a single analysis, the credit system is often comparable or even cheaper. The savings with BYOK become significant when you're running multiple analyses — iterating on revisions, testing different models, or processing multiple manuscripts.
BYOK Security
Your API keys are sensitive credentials. Here's how Galleys protects them:
- Encryption at rest: Keys are encrypted with AES-256-GCM using a server-side encryption key. The plaintext key is never stored in the database.
- Decryption only at analysis time: Your key is decrypted in memory only when an API call is being made, then discarded.
- No logging: API keys are excluded from all application logs.
- User-controlled: You can delete your stored keys at any time from Settings → API Keys. Deletion is immediate and permanent.
Which Plan Includes BYOK?
BYOK is available on Author ($29/mo), Professional ($59/mo), and Studio ($199/mo) plans. The Free and Essay plans use credit-based analysis only.
Even on BYOK-enabled plans, you still receive your monthly credit allocation. You can mix and match — use credits for quick analyses and BYOK for deep dives with premium models.
When to Use BYOK vs. Credits
Use credits when:
- You're analyzing occasionally (a few times per month)
- You want the simplest possible workflow
- You're using standard models (Haiku, Sonnet, GPT-4o)
Use BYOK when:
- You're analyzing frequently (multiple manuscripts or revisions per week)
- You want access to premium models (Claude Opus)
- You're an editor processing client manuscripts
- You want to test multiple models on the same manuscript to compare results
Getting Started with BYOK
If you're on an eligible plan, head to Settings → API Keys to add your first key. If you're not sure which model to start with, Claude Sonnet offers the best balance of quality and cost for most manuscripts.
And if you're curious about the differences between models — which one is best for your genre, your manuscript length, and your budget — we wrote a detailed comparison in our guide to choosing the right AI model.