Skip to main content
Enclave
Concept explainer

What is BYOK (Bring Your Own Key)? Why it matters more and more for AI apps

BYOK (Bring Your Own Key) means using your own model API key inside an AI app, instead of being locked into the platform's built-in models and billing. It puts you in charge of cost, lets you swap models freely, and keeps the data path in your own hands — Enclave supports BYOK natively.

Last reviewed:

The short answer

BYOK = using your own model API key in the app: transparent cost, swappable models, a data path you control. Enclave supports BYOK natively, plus local models.

Key points at a glance

  • BYOK bills you at the model provider's raw price — no platform markup, no black-box quotas.
  • Model freedom: switch among OpenAI / Anthropic / Gemini / DeepSeek anytime, and use new models the day they ship.
  • A data path you control: requests go from your deployment straight to the model provider, with no app-platform relay in between.

What BYOK actually is

Most AI apps hide the model behind themselves: you pay their subscription price, use the model they chose, and quotas and rate limits are a black box. BYOK (Bring Your Own Key) flips this — the app provides the product experience, while model calls go through your own API key. You open an account with OpenAI, Anthropic or another provider, paste the key into the app, and from then on every call and every cent shows up plainly on your own bill.

Three practical benefits of BYOK

First, transparent cost: billed at the provider's raw price, heavy use often beats a subscription, and light use costs next to nothing (depending on model and usage). Second, model freedom: GPT today, Claude tomorrow, DeepSeek the day after — without changing apps, and new flagship models are usable on launch day. Third, a shorter data path: conversations go from your deployment straight to the model provider, and the app platform never handles your content — especially important for privacy-sensitive uses.

The limits of BYOK: you must manage the key yourself

BYOK also means responsibility comes back to you: a leaked key can be abused, so only paste keys into apps that are open-source auditable or that you deploy yourself; setting a spending cap on the key is good practice too. Note that the model provider can still see the requests that pass through it — for thorough privacy, the next step is local models.

How Enclave does BYOK

Enclave is designed around BYOK natively: when self-hosting, put your key in .env (OpenAI / Anthropic / Gemini / DeepSeek and more supported), or point it at a local Ollama / vLLM instead — no cloud key needed at all, and data never leaves the machine. The whole system is MIT open source, so where your key goes can be verified line by line.

FAQ

  • Which large language models does Enclave support?
    Enclave's model layer is fully swappable: OpenAI, Anthropic, Google, DeepSeek, and local Ollama / vLLM can all be configured. Different characters can even use different models, freely allocated by scenario and cost.
  • Can I self-host Enclave? Is it hard?
    Yes, and it's about as hard as running an ordinary web service. If you've used docker compose, three steps get you your own instance: clone the repo, copy .env, and docker compose up. The API, frontend, database, and vector index all run on your own machine.
  • Is my conversation data safe? Will it be used for training?
    In self-hosted mode, your conversations live only on your own drive — they never leave your machine and are never used by any third party for training. The model layer can connect to cloud APIs like OpenAI and Anthropic, or be swapped for local Ollama / vLLM to run fully offline; you decide which kind of conversation goes to which model.

Ready to try it?

Open it in your browser — no credit card, no install.

Related

ShareXTelegramLINEWeibo
What is BYOK (Bring Your Own Key)? Why it matters more and more for AI apps · Enclave