Bring your own key (BYOK)

Use your own OpenAI or Anthropic API key to eliminate per-message AI costs and manage your LLM budget directly.

~10 minutes Starter

How BYOK works

In standard mode, DGbot's own LLM API keys are used and the cost is included in your credit consumption. With BYOK, you provide your own OpenAI or Anthropic API key:

  • DGbot uses your key to make LLM API calls
  • OpenAI or Anthropic bills your account directly for token usage
  • DGbot charges a reduced orchestration fee per message (covers the retrieval, routing, and infrastructure — not the model)

BYOK is ideal for:

  • Teams who already have enterprise agreements with OpenAI or Anthropic
  • High-volume deployments where the per-message cost reduction is material
  • Organisations with data residency requirements that mandate using their own API accounts

Connect your API key

1
Open Billing → BYOK

Go to Billing and select the BYOK tab.

Open Billing in admin
billing/byok-settings Screenshot needed — save as: _assets/images/billing/byok-settings.png

The BYOK tab in billing. Connect your OpenAI or Anthropic API key.

2
Select your provider

Choose OpenAI or Anthropic.

3
Enter your API key

Paste your API key. DGbot validates it immediately by making a test call.

Create a separate API key for DGbot
Don't use your primary API key. Create a dedicated key in your OpenAI or Anthropic account for DGbot. This lets you monitor DGbot's usage separately and revoke access without affecting other applications.
4
Select the model

Choose which model DGbot should use with your key. Only models available under your API plan are listed.

5
Click Save

Your API key is encrypted and stored. DGbot begins using your key for all new conversations immediately.

billing/byok-connected Screenshot needed — save as: _assets/images/billing/byok-connected.png

A green Connected badge confirms your API key is active and validated.


Supported providers

ProviderSupported models
OpenAIGPT-4o mini, GPT-4o
AnthropicClaude Haiku, Claude Sonnet

Costs with BYOK

With BYOK enabled:

  • LLM cost — Billed directly to your OpenAI/Anthropic account at their standard token pricing
  • Orchestration fee — DGbot charges a reduced per-message fee for retrieval, routing, and infrastructure (details in Billing → BYOK)

Your DGbot plan credits are not consumed for AI responses when BYOK is active. Plan credits are still used for any non-BYOK features that remain on DGbot's models.