docs · script-tag embed
The bubble on any website.
No React. No build step.
One script tag puts a live AI video character on plain HTML, Webflow, Wix — anywhere you can paste custom code. It talks to a tiny endpoint on your server, so your Bubblio API key never touches the browser.
How it works
- 1The script tag renders the bubble.One deferred ~290 KB gzipped file from a CDN, with the whole widget (and its own React) bundled inside. It floats over the page and stays idle — an idle bubble costs nothing.
- 2A click calls your session endpoint.The widget POSTs to the data-server-url you configured. That endpoint runs on your server, holds your secret API key, and asks Bubblio for a session — with whatever personality, character, and tools you define.
- 3The browser connects to the character.Your endpoint returns short-lived, single-session credentials. The widget opens a WebRTC connection to the avatar provider Bubblio chose — Runway, Tavus, or Anam, with automatic failover — and your visitor is talking to a person.
Step 1 — Create your session endpoint
A few lines on your backend (any host: Vercel, a VPS, a Lambda). Grab an API key from the dashboard first. If your website and this endpoint live on different domains — always the case for Webflow/Wix — include the CORS header shown below.
Step 2 — Paste the script tag
Point data-server-url at the endpoint from step 1. Prefer configuring from JavaScript? Use the second tab — set window.bubblioConfig in an inline script above the embed tag (inline scripts run before defer’d ones, so that order is always safe).
After the script loads there’s also a runtime API for single-page flows: window.Bubblio.init(config) / Bubblio.destroy(). Call it from the script tag’s load event or a user interaction — never from an inline script above the tag (it hasn’t loaded yet there).
Platform guides
- Paste the tag right before </body> on every page that should show the bubble.
- Done — defer means it never blocks your page render.
- Site settings → Custom code → Footer code, paste the tag.
- Use Page settings → Custom code instead if you only want it on some pages.
- Publish. Custom code does not run in the Designer preview — check the published site.
- Settings → Advanced → Custom Code → “+ Add Custom Code”.
- Paste the tag, apply to All pages, place in Body — end.
- Publish and view the live site.
- Any builder that injects raw HTML into the page works: Squarespace Code Injection (footer), Framer custom code (end of <body>), Shopify theme.liquid before </body>.
- Rule of thumb: page-level code injection works; iframe-sandboxed “embed” widgets don’t.