Back to Blog
AIBYOKDocumentationPricingOpenAIAnthropic

BYOK AI: Why We Let You Bring Your Own API Key

How Dokly's Bring Your Own Key approach to AI writing saves you money while giving you full control. Compare with Mintlify, GitBook, and others.

Gautam Sharma

Author

6 min read
BYOK AI: Why We Let You Bring Your Own API Key

We just shipped AI-powered writing assistance in Dokly. But instead of charging you $50/month extra for "AI features" like everyone else, we did something different: Bring Your Own Key (BYOK).

Here's whyβ€”and why it saves you real money.

The AI Markup Problem#

Most documentation platforms are adding AI features. Great! But look at how they're pricing it:

PlatformAI FeaturesPrice
MintlifyAI Chat, AI Search+$150/month (Growth plan)
GitBookAI SearchEnterprise only
ReadmeAI SuggestionsEnterprise only
NotionAI Writing+$10/user/month
DoklyAI Writing$0 (use your own key)

These companies are essentially reselling OpenAI/Anthropic API calls with a 10-50x markup.

How BYOK Works#

With Dokly, you plug in your own OpenAI or Anthropic API key:

  1. Go to Project Settings β†’ AI Settings
  2. Choose your provider (OpenAI or Anthropic)
  3. Paste your API key
  4. Start using AI features in the editor

That's it. Your key, your costs, no middleman markup.

Real Cost Comparison#

Let's do the math on actual usage.

Typical Documentation Team Usage#

A team writing docs might make ~500 AI requests per month (improving text, expanding sections, fixing grammar). That's roughly 1 million tokens.

With Mintlify's AI:

  • $150/month for AI features
  • That's $0.30 per request

With Dokly BYOK (using GPT-4o-mini):

  • ~$0.15 per 1M input tokens, $0.60 per 1M output tokens
  • 500 requests β‰ˆ $0.50-2.00/month
  • That's $0.001-0.004 per request

You save: $148/month (that's $1,776/year)

The Math Gets Worse at Scale#

Larger teams using AI more heavily see even bigger differences:

Monthly RequestsMintlify AIDokly BYOKYou Save
100$150~$0.10$149.90
500$150~$1.00$149.00
2,000$150~$4.00$146.00
10,000$150+~$20.00$130+

The platforms charging flat fees are betting you won't use AI much. If you do use it, BYOK wins. If you don't use it much, BYOK still wins (you pay almost nothing).

What AI Features Does Dokly Include?#

Select any text in your docs and use:

✨ Improve Writing#

Makes your documentation clearer and more professional. Fixes awkward phrasing, improves flow.

Markdown
Before: "You can use this to make the thing work better"
After: "Use this method to optimize performance"

πŸ“ Expand Content#

Adds more detail, examples, and context to brief explanations.

Markdown
Before: "Install the SDK"
After: "Install the SDK using your preferred package manager:
 
npm install @yourcompany/sdk
# or
yarn add @yourcompany/sdk
# or
pnpm add @yourcompany/sdk"

🎯 Simplify Text#

Makes complex technical content easier to understand.

Markdown
Before: "The asynchronous callback-based architecture facilitates
non-blocking I/O operations through event-driven paradigms"
After: "Our system handles multiple requests at once without
waiting, making your app faster"

πŸ”§ Fix Grammar#

Catches typos, grammar issues, and punctuation problems instantly.

Why Not Just Build Our Own AI?#

Some platforms train custom models or build elaborate AI pipelines. We asked: why?

  • GPT-4 and Claude are already excellent at technical writing
  • Custom models are expensive to train and maintain
  • API-based approach means you always get the latest improvements
  • Less infrastructure for us = lower prices for you

We'd rather pass savings to you than build empire infrastructure.

Privacy and Security#

Your API key is:

  • Stored encrypted in our database
  • Never logged in requests or analytics
  • Used only for your AI requests
  • Deletable anytime from your settings

We never see your API key in plaintext after you save it. Your docs stay your docs.

Provider Choice: OpenAI vs Anthropic#

We support both major providers. Here's how to choose:

OpenAI (GPT-4o-mini)

  • Faster responses
  • Lower cost per token
  • Great for quick improvements and fixes

Anthropic (Claude)

  • Often better at nuanced writing
  • Excellent at maintaining voice/tone
  • Better at longer-form content

Both work great. Start with OpenAI for speed/cost, try Anthropic if you want different results.

Getting Started#

1. Get an API Key#

OpenAI:

  1. Go to platform.openai.com
  2. Create an account or sign in
  3. Navigate to API Keys
  4. Create a new key

Anthropic:

  1. Go to console.anthropic.com
  2. Create an account or sign in
  3. Navigate to Settings β†’ API Keys
  4. Create a new key

2. Add to Dokly#

  1. Open your project in Dokly
  2. Go to Settings β†’ AI Settings
  3. Select your provider
  4. Paste your API key
  5. Click "Test Connection" to verify
  6. Save

3. Start Using AI#

In the editor:

  1. Select any text
  2. A menu appears with AI options
  3. Click "Improve", "Expand", "Simplify", or "Fix"
  4. AI processes your text
  5. Result replaces your selection

It's that simple.

The Indie Philosophy#

We built Dokly because documentation tools are absurdly overpriced. AI features shouldn't change that.

When a startup charges $150/month for something that costs them $2/month in API calls, that's not a productβ€”it's a tax on your growth.

BYOK is the honest approach:

  • You pay the actual cost
  • We don't profit from your usage
  • Everyone wins

FAQ#

Q: Is my API key safe? Yes. It's encrypted at rest and never logged. You can delete it anytime.

Q: What if I don't have an API key? Create one free at OpenAI or Anthropic. Both offer free credits for new accounts.

Q: Can I set spending limits? Yes! Both OpenAI and Anthropic let you set monthly spending limits in their dashboards.

Q: What models do you use? GPT-4o-mini for OpenAI, Claude Sonnet for Anthropic. Fast and cost-effective.

Q: Is this only for Pro plans? Yes, AI features require Pro ($19/month) or higher. But you save way more than $19 compared to alternatives.


Ready to try AI-powered documentation without the markup? Start your free trial and bring your own key. Your docs, your AI, your savings.

Written by Gautam Sharma

Building Dokly β€” documentation that doesn't cost a fortune.

Follow on Twitter β†’

Ready to build better docs?

Start creating beautiful documentation with Dokly today.

Get Started Free