blip.ai.text() API. That means the app you get back can call an AI model at runtime — not just during the build — so you can create things like joke generators, recipe suggesters, writing assistants, and anything else that needs live AI responses. The toggle is off by default; flipping it on is the only thing you need to do before writing your prompt.
Enabling AI
1
Turn on the AI switch
Before typing your prompt, find the AI toggle in the build panel and switch it on. The toggle must be enabled before you generate — you cannot add
blip.ai.text() support to an already-generated app without regenerating it.2
Describe the AI feature in your prompt
Write your prompt as you normally would, but include a plain-English description of what you want the AI to do. You do not need to write any code — just describe the behavior.
3
Generate your app
Press the build button. AppBlips generates a working app that already knows how to call
blip.ai.text() wherever you described it.How to Describe AI Features
Describe what the user does, when the AI should respond, and what the response should look like. You do not need to reference the API by name — but you can if you want to be explicit. Joke writer:
Build a joke-writing app. When someone chooses a topic and presses Generate, call blip.ai.text to write one short family-friendly joke, show a loading state while it runs, and display a friendly retry message if something goes wrong.
Recipe suggester:
Build a recipe suggester. The user enters a few ingredients they have on hand and presses Find Recipes. Call blip.ai.text to return three recipe ideas with names and short descriptions. Show a spinner while loading.
Writing assistant:
Build a cover-letter helper. The user pastes a job description and writes a few notes about themselves, then clicks Generate. Use blip.ai.text to produce a polished cover letter paragraph they can copy.
Two Access Modes
AI-enabled apps can get their credentials in two ways, depending on how AppBlips is configured.BYOK Mode
Each person using your app enters their own API key, endpoint, and model name. The key never leaves their browser and is never baked into the HTML. This is the default for self-hosted installations.
Relay Mode
The operator (you, running the self-hosted server) provides a key server-side. Users never see a credential prompt — AI calls are proxied through your server. The key stays on the server; only a relay URL is embedded in the app.
Accessing AI in the Preview
The live preview supportsblip.ai.text() in real time — you can test your AI feature before exporting or sharing anything. In BYOK mode, the first AI call opens a Connect your AI provider dialog right inside the preview. Enter your endpoint, model, and API key, and subsequent calls in that session use those credentials automatically.
In relay mode, AI calls in the preview go through your server’s relay endpoint — no dialog appears and no key is needed from the preview user.
Exporting AI-Enabled Apps
When you export an AI-enabled app as an HTML file, the AI bridge is included automatically. The behavior on first use depends on the mode the app was built in:- BYOK mode: The exported HTML contains no credentials. Anyone who opens the file sees the Connect your AI provider dialog on their first AI call. Each person supplies their own key; nothing is shared.
- Relay mode: The exported HTML embeds the relay URL (for example
/api/app-ai/chat) but not the provider key, which stays on your server. Anyone who opens the file can make AI calls through your relay as long as they can reach that URL.
For the full JavaScript API — including streaming, error codes, and the
configure(), isConfigured(), and clearConfiguration() helpers — see the blip.ai API Reference.