● AI6 min read

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.

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.

Update, November 2026: This post describes how AI launched in January, and that version is gone. Today every plan — including Enterprise — runs AI writing on a single hosted key; there is no bring-your-own-key option anywhere in Dokly, and the "How BYOK Works" steps below no longer exist in the product. Usage is metered per plan instead. The sections below are kept for the cost reasoning, not as instructions — skip to the current AI section if you just want today's setup. The bigger change since this post: you can also connect your own AI agent (Claude Code, Cursor) over MCP to draft and publish docs directly — see mcp.dokly.co.

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 WritingIncluded (monthly credits on every plan)

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

How AI pricing works today#

Bring-your-own-key is gone. There's no provider picker and no key to paste — every plan, Free through Enterprise, calls a single hosted Claude key on Dokly's side, and usage is metered against a monthly credit bucket instead of billed to a key you own. You never see a per-request bill; you just have a plan-sized bucket that resets monthly.

The original cost argument (January 2026)#

This is the BYOK math that justified shipping the feature at launch. It no longer describes how Dokly bills AI usage — see the update above — but the underlying point (flat per-seat AI fees are a large markup over the actual API cost) is still why Dokly includes AI usage in the plan price instead of charging extra for it.

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 today?#

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.

Getting started today#

There's nothing to configure. Select any text in the editor and the AI actions (Improve, Expand, Simplify, Fix) are right there — no settings page, no provider picker, no key to generate or paste. Usage draws down your plan's monthly credit bucket automatically.

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 a few dollars in API calls, that's not a product — it's a tax on your growth. Dokly includes AI usage in the plan price instead of billing it separately.

FAQ#

Q: What if I use up my AI credits for the month? You can keep writing by hand — nothing else in the editor is gated. Credits reset on your plan's monthly cycle, and a higher plan gets a bigger bucket.

Q: What model do you use? Claude (Anthropic), on a single hosted key Dokly manages. You don't need your own API key or account with any AI provider.

Q: Is this only for paid plans? No — AI writing is included on every plan, starting with Free. Paid plans get a larger monthly credit allowance; see /pricing for current limits.


Ready to try AI-powered documentation without the markup? Start on the Free plan: AI credits are included, no key or card needed.

Written by Gautam Sharma, Founder Dokly

Building Dokly — documentation that doesn't cost a fortune. AI-ready docs out of the box.

Follow on X →
Start for free

Ready to build better docs?

Start creating beautiful, AI-ready documentation with Dokly today. No git, no YAML, no friction.

Get started free