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.

5 min readSume
All posts

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: Bearer or x-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/json as 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.

From Sume's Video Generation and Jobs and results docs and Bubble's call settings, read 2026-09-27.
CallMethod and URLWhat comes back
Start videoPOST https://api.sume.com/v1/videos202 with id, polling_url, and status: "pending"
Check videoGET https://api.sume.com/v1/videos/[id]status: pending, in_progress, completed, failed, or cancelled
Get resultGET https://api.sume.com/v1/jobs/[id]/resultdata.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-Key header 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 409 doesn'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_video runs Check video. While status is pending or in_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 first url in data.result.artifacts, a media.sume.com URL, to your Thing. On failed or cancelled, it saves the status; the error field 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

Related posts

More in Integrations

All Integrations posts

Written by Sume