Bubble API Connector: generate AI video with the Sume API
Set up Bubble's API Connector for Sume: the key in a private header, a manual response so setup costs nothing, and a backend poll of the job.

To generate AI video in a Bubble app with Sume, add an API Connector collection that authenticates with Private key in header (Authorization, Bearer <key>), add an action call for POST https://api.sume.com/v1/videos, set it up with a manual response so setup doesn't start a paid job, and let a backend workflow poll GET /v1/videos/[id] every 30 seconds until the job ends.
Sume has no Bubble plugin; the API Connector makes plain HTTPS calls from Bubble's server. Sume facts come from Video Generation, Jobs and results, and Authentication; Bubble facts come from its manual pages on the API Connector, its authentication and call settings, and API workflows, all read on 2026-09-27. Airtable automation video generation API shows the webhook version of this flow.
How do I keep the Sume key private in Bubble?
Set the collection's Authentication to Private key in header. Bubble then adds that header to every call in the collection:
- Key name:
Authorization. Private key:Bearer, a space, then your Sume key; Bubble's docs say to put a prefix such as Bearer before the key, separated by a space. - Sume takes one credential per request,
Authorization: Bearerorx-api-key, never both. - Calls run through Bubble's server by default, but a description of each call reaches the browser, so secrets belong in fields marked Private. Never keep the key in option sets, on-page elements, or workflow inputs.
- Add
Content-Type: application/jsonas a shared header so every call sends it.
Which calls does the Sume collection need?
Three calls, all set to Use as Action so workflows can run them. In Start video's JSON body, <prompt> is a dynamic parameter: Bubble turns a name wrapped in <> into a field, and the parameter needs its Private box unticked to take values from the app. In the other two URLs, [id] in square brackets becomes a parameter for the job id.
| Call | Method and URL | What comes back |
|---|---|---|
| Start video | POST https://api.sume.com/v1/videos | 202 with id, polling_url, and status: "pending" |
| Check video | GET https://api.sume.com/v1/videos/[id] | status: pending, in_progress, completed, failed, or cancelled |
| Get result | GET https://api.sume.com/v1/jobs/[id]/result | data.result.artifacts with media.sume.com URLs; 409 job_not_completed unless the job completed |
{
"model": "sume/auto",
"prompt": "<prompt>",
"aspect_ratio": "9:16",
"duration": 5
}How do I set up Start video without paying for a video?
Paste a manual response instead of initializing it. Initialization isn't a simulation: it sends a real request, so a live one would submit a real, paid job. Bubble's docs name paid APIs as a use for a manual response, which maps the fields just as initialization does. Paste the documented 202 shape; responses echo sume/auto as the model:
{
"id": "job_123",
"polling_url": "https://api.sume.com/v1/videos/job_123",
"status": "pending",
"model": "sume/auto"
}What else do the calls need before going live?
Three settings keep retries and errors from causing trouble:
- Give Start video an
Idempotency-Keyheader whose value changes per video, such as the Thing's unique id plus a version, and leave its Private box unticked so the workflow can set it. A replay of a key returns the original job, and Sume's docs say to reuse a key only for the same operation and payload. - On Get result, tick Include errors in response & allow workflow actions to continue, so a
409doesn't stop the workflow. Changing that box after initialization means initializing again. - Clear test values before deploying: Bubble puts them in your app's source code unless the field is Private.
How does the app know the video is ready?
Poll from a backend workflow. Enable the Workflow API and backend workflows under Settings - API, and create an API workflow, check_video, with a job_id parameter. After Start video, schedule it with Schedule API workflow:
check_videoruns Check video. Whilestatusispendingorin_progress, it schedules itself again at Current date/time + 30 seconds, the example polling interval in Sume's docs.- On
completed, it runs Get result and saves the firsturlindata.result.artifacts, amedia.sume.comURL, to your Thing. Onfailedorcancelled, it saves the status; theerrorfield says what went wrong. - New Bubble apps end recursive workflow chains after 10 iterations by default, only five minutes at this interval. Raise the limit: video generation typically takes 30 seconds to several minutes.
- Each API call consumes workload, and recursion costs more workload than scheduling a list.
Which video URL should the app store?
The media.sume.com URL from Get result. Don't store unsigned_urls[0] from Check video: it points at GET /v1/videos/{id}/content, which the docs call with your API key, so a video element in the browser couldn't play it without the key. Do Sume video URLs expire? covers how long each URL lasts.
Sources
- Video Generation
- Jobs and results
- Authentication
- Bubble: The API Connector (read 2026-09-27)
- Bubble: API Connector authentication (read 2026-09-27)
- Bubble: API Connector, adding calls (read 2026-09-27)
- Bubble: OpenAI chat call guide (read 2026-09-27)
- Bubble: Adding API connections (read 2026-09-27)
- Bubble: The Workflow API (read 2026-09-27)
- Bubble: Scheduling API workflows (read 2026-09-27)
- Bubble: Recursive API workflows (read 2026-09-27)
Related posts
More in Integrations
- Claude Agent SDK MCP server: connect Sume with an API key
Add Sume's hosted MCP server to the Claude Agent SDK with an API-key header, allow only the tools you need, and dry-run paid calls before submitting.
- Claude API MCP connector with Sume: what works today
The Claude API MCP connector has no documented way to authenticate to Sume's hosted MCP today. Why, and what to use instead, like the Agent SDK.
- Cloudflare Workers webhook to a Queue for Sume video runs
Verify Sume's signed POST in a Cloudflare Worker, enqueue a small message, and answer 204 fast. Queue messages cap at 128 KB; receipts reach 1 MiB.
- CrewAI video generation with a Sume Agent Completions tool
Give a CrewAI agent a BaseTool that hands a video brief to Sume Agent Completions with a spend cap, then reads the agent.run for the finished video.
Written by Sume