Skip to main content
BYOK (Bring Your Own Key) is the default AI access mode for self-hosted AppBlips installations. Instead of the operator paying for AI calls, each person who uses an AI-enabled app supplies their own credentials directly inside that app. The key is stored only in that person’s browser and is never sent to AppBlips, never written into the generated HTML, and never visible to the operator.

How It Works for Users

1

Use the app as normal

Open the AI-enabled app in your browser (in the live preview or as an exported HTML file). Everything works as expected until the first feature that calls AI.
2

The Connect dialog appears automatically

The first time the app needs to make an AI call, a Connect your AI provider dialog appears. You do not need to do anything special to trigger it — the app handles this for you.
3

Enter your provider details

Fill in the three required fields:
  • API endpoint — the base URL for your OpenAI-compatible provider (defaults to https://api.openai.com/v1)
  • Model — the model name to use, for example gpt-4o-mini
  • API key — your secret key for that provider (for example, an sk-… key from OpenAI)
4

Choose whether to remember your credentials

Check Remember on this device if you want your credentials saved across sessions. Without this, the key is cleared when the tab closes and you will be prompted again next time.
5

Click Connect AI

Your credentials are saved in browser storage and the original AI request completes immediately. Future calls in the same session skip the dialog entirely.

The Connect Dialog

The dialog asks for three fields and one option: The dialog can also be opened at any time by calling blip.ai.configure() — for example, if the app includes a Settings button that lets users update their provider.

Security Notes

Your API key is stored in browser storage and is accessible to any JavaScript running inside that app. Only use a key you are personally permitted to use in this browser context. Never enter a shared or team key into a public app — anyone with access to the app could use or extract it.
A few things to keep in mind:
  • The key is never sent to AppBlips or written into the generated HTML file.
  • The key is accessible to scripts running inside the app (the same origin), which is unavoidable for client-side browser storage.
  • If you use Remember on this device, the key persists in localStorage until you call blip.ai.clearConfiguration() or clear your browser data manually.
  • Without Remember on this device, the key lives in sessionStorage and is cleared automatically when the tab closes.

Compatible Providers

BYOK mode works with any provider that implements the OpenAI chat completions API format and allows browser requests via CORS. Examples include:
  • OpenAIhttps://api.openai.com/v1, models like gpt-4o, gpt-4o-mini
  • Azure OpenAI — your Azure deployment endpoint
  • Groqhttps://api.groq.com/openai/v1, fast open-source models
  • Ollamahttp://localhost:11434/v1 for locally running models (must have CORS enabled)
  • LM Studiohttp://localhost:1234/v1 for locally running models (must have CORS enabled)
If you are using a local model with Ollama or LM Studio, make sure CORS is enabled in that tool’s settings so browser requests from the app are accepted.

For Self-Hosted Operators

BYOK is the default mode and requires no additional server-side configuration beyond what is already in your .env file. The relevant variable is:
This is the default value, so if you have not set it, BYOK is already active. No APPBLIPS_APP_LLM_* variables are needed — those are only used in relay mode.
If you want to fund AI access for your users so they never need to enter a key, see Relay Mode.