UnmarkdownDocs

AI Keys (BYOK)

Bring your own OpenAI and Anthropic API keys for unlimited AI-powered features.

What Is BYOK?

BYOK (Bring Your Own Key) lets you connect your personal OpenAI and Anthropic API keys to Unmarkdown. When a BYOK key is active, AI-powered features use your key directly, bypassing all built-in usage quotas. This gives you unlimited access to features like AI editing, semantic search, and hover summaries.

BYOK is a Pro-only feature.

Adding Your Keys

Open Settings (click your avatar, then Settings) and navigate to the AI tab (Brain icon). You will see two input fields:

  • OpenAI API Key: used for embeddings (semantic related documents) and as a fallback for AI editing
  • Anthropic API Key: used for AI hover summaries and as the primary model for AI editing

Paste your key into the field and click Save. The key prefix (first few characters) is displayed for identification, but the full key is never shown again after saving.

Tip
You do not need both keys. Add whichever key matches the features you want to use. OpenAI keys enable semantic search and embeddings. Anthropic keys enable hover summaries.

What BYOK Unlocks

With a BYOK key active, the following changes take effect:

  • AI Quick Actions: unlimited usage (no lifetime or hourly quota)
  • Embeddings generation: uses your OpenAI key for document embeddings
  • Semantic related documents: AI-powered similarity search instead of keyword-only
  • AI hover summaries: generates wikilink previews using your key

Features that do not use AI (unlinked mentions, auto-suggest links, the document graph) are unaffected by BYOK. They work the same regardless of whether a key is set.

Key Security

Your API keys are encrypted with AES-256-GCM before being stored in the database. The encryption key is managed server-side and is not accessible to client code. Keys are decrypted only at the moment an AI request is made, and the decrypted value is never sent to the browser.

  • Keys are encrypted at rest in the database
  • Only the key prefix is visible in the Settings UI
  • Keys are transmitted over HTTPS
  • Removing a key deletes it from the database immediately

Removing a Key

To remove a key, go to Settings > AI and click Remove next to the key you want to delete. The key is deleted from the database immediately. AI features will revert to the built-in quota system (or stop working if they require an API key).

AI Feature Toggles

The AI tab in Settings also includes toggles for individual features:

  • Related documents: on by default. Uses keyword matching without an API key, or semantic search with an OpenAI key.
  • Auto-suggest links: on by default. Runs client-side, no API key needed.
  • AI hover summaries: off by default. Requires Pro or BYOK to enable.

These toggles let you control which AI features are active without removing your keys.

Cost

When using BYOK, you pay the AI provider directly for usage. Unmarkdown does not add any markup or surcharge. Typical costs:

  • AI Quick Actions (Claude Haiku): approximately $0.003 per action
  • Embeddings (text-embedding-3-small): approximately $0.02 per million tokens
  • Hover summaries (Claude Haiku): approximately $0.001 per summary
Note
BYOK costs are between you and the AI provider. Check your OpenAI or Anthropic dashboard for actual billing details.