Five elements, 21 server actions, three providers, one set of fields.
Every field below says what it is for, and every element and action ends with a worked example you can build in Bubble in a few minutes.
Getting started — Setup · The two kinds of key · The 30-second ceiling
Elements — AI Chat · AI Text · AI Voice · AI Autocomplete · AI Command
Server actions — Text · Images and documents · Voice · Knowledge · Memory · Safety and data
Reference — Structured output · Reading JSON · Agents and tools · Knowledge bases · Errors · Cost · Limits
Plugins → AI Toolkit in your app, then fill in at least one key.
| Field | Where to get it | Used by |
|---|---|---|
openai_api_key |
platform.openai.com | All the OpenAI server actions |
anthropic_api_key |
console.anthropic.com | All the Claude server actions |
google_api_key |
aistudio.google.com | All the Gemini server actions |
openai_api_key_public |
the same OpenAI key | AI Chat and AI Text, which run in the browser |
pinecone_api_key |
pinecone.io | Only for knowledge bases over ~500 pages |
vapi_public_key |
vapi.ai | Only for real phone calls through Vapi |
One provider is enough to start with.
Before you build anything, set a spending cap. platform.openai.com → Settings → Billing → Limits. It is the only hard guarantee against a surprise bill, and it takes thirty seconds.
This catches everyone once, so it is worth two minutes.
Server actions run on Bubble’s servers. They read the Private key. It never reaches the browser and a visitor cannot extract it. This is the safe default and it covers 21 of the 26 pieces in this plugin.
The streaming elements — AI Chat and AI Text — run in the visitor’s browser.
That is what makes text appear word by word instead of arriving in one lump after
eight seconds. But a browser, by design, cannot read a key marked Private. It
needs the _public field.
| What you are building | Key it uses |
|---|---|
| Any server action | Private |
| AI Chat or AI Text | _public — the element runs client-side either way |
| AI Voice | neither — see below |