C
Chatty

Bring Your Own Key (BYOK)

BYOK lets you power your Chatty bot with your own API key from OpenAI, Anthropic, or OpenRouter — your key, your quota, your cost.

BYOK replies skip Chatty's agentic tool-calling (lead capture, calendar booking, and other actions) — that stays Gemini-only, since each provider's function-calling schema differs enough that wiring them all in is separate work. BYOK replies are still knowledge-base-grounded (the same RAG-augmented system prompt is used), just without the ability to take actions mid-conversation.

Why BYOK?

  • Your billing — inference charges go directly to your AI provider account.
  • Your quota — no shared rate limits with other Chatty users.
  • Model access — use whatever model your provider account supports.
  • Data agreements — some enterprise AI contracts require that API calls originate from your own key.

Supported providers

ProviderDefault model (if you don't set one)
OpenAIgpt-4o
Anthropicclaude-3-5-sonnet-latest
OpenRoutermistralai/mistral-large — or any model listed at openrouter.ai/models
Google Gemini isn't a BYOK option — it's Chatty's built-in model and always has full tool-calling support.

You can set any specific model your provider account supports (e.g. gpt-4o-mini, claude-opus-4-8) — it isn't validated against a fixed list, so double-check the model name is one your provider actually serves.

Setting up BYOK

BYOK is configured from the dashboard — it's tied to your logged-in account, not the public API key system used elsewhere in these docs.

  1. Go to Dashboard → Settings → AI Model
  2. Select your provider and (optionally) a specific model
  3. Paste your API key into the Your API Key field
  4. Click Save — the key is encrypted at rest before storage
Never share your AI provider key publicly. Keys are stored encrypted and are write-only — you cannot retrieve a saved key from the dashboard once saved, only replace or clear it.

To remove BYOK and revert to Chatty's shared Gemini model, clear the provider/key fields and save again.

Security model

  • Keys are encrypted at rest with Fernet (symmetric AES-128-CBC + HMAC) before being stored in the database.
  • The encryption key (BYOK_ENCRYPTION_KEY) is a secret stored in the server environment, never in the database.
  • All AI provider calls are made server-side — your key is never exposed to the browser.
  • GET-ing your BYOK status never returns the decrypted key — only the provider/model and whether one is configured.

Cost considerations

When BYOK is active, AI inference costs are billed directly to your provider account. Chatty still charges your subscription for platform usage (bots, seats, storage, support) but not for token consumption.

Use OpenRouter with BYOK to access many models under a single key, including open-source models with lower per-token costs than proprietary options.