Fan out one Sume clip to three platforms: one webhook, three task keys
Receive one job.completed webhook per Sume job, then enqueue a task per platform. Key each task by job id plus platform so a retry never double-posts.

One Sume job produces one job.completed webhook, so fan out on your side: verify and dedupe the delivery by job_id, then enqueue one publish task per platform with a key of job_id:platform. A retried webhook then creates no new tasks, and a failed platform retries alone.
Sume tells receivers to use job_id as the idempotency key, because it retries non-2xx responses up to 10 attempts.
What is the task layout?
One row per platform keeps retries independent.
| Task key | Platform step | Retried when |
|---|---|---|
job_1:youtube | YouTube upload | Only that upload fails |
job_1:tiktok | TikTok init and upload | Only that post fails |
job_1:instagram | Instagram Reel container and publish | Only that publish fails |
How do I enqueue idempotently?
The sample expands one completed event into three keyed tasks and ignores a repeat.
PLATFORMS = ["youtube", "tiktok", "instagram"]
tasks = {}
def on_event(event: dict) -> int:
if event.get("event") != "job.completed":
return 0
job_id = event["job_id"]
added = 0
for platform in PLATFORMS:
key = f"{job_id}:{platform}"
if key not in tasks:
tasks[key] = "queued"
added += 1
return added
if __name__ == "__main__":
evt = {"event": "job.completed", "job_id": "job_1"}
print(on_event(evt), on_event(evt))What must the receiver do first?
Verify the sume-v1 signature on the raw body, return a fast 2xx after storing the event, and treat an unknown event type as 204, not an error, so a new event never starts a retry storm (Verifying webhooks).
Sources
Related posts
More in Developers
- Fields Omni rejects on Sume: generate_audio false, bitrate_mode
Which request fields Sume's gemini-omni-flash-1.1 refuses or lacks: generate_audio false, bitrate_mode, reference_audio_urls, plus edit-mode rules.
- Firebase allows 1-hour HTTP functions; don't hold a Sume job open
Firebase HTTP functions can run up to an hour and Cloud Tasks covers longer work. Even so, submit Sume jobs async and take the result by webhook or status poll.
- 'first_frame_url must match image_url': two names, one value
image_url and first_frame_url are aliases on Video Router. Send both only if the strings are identical, same for end_image_url and last_frame_url, or get a 400.
- Fix a first frame with Ideogram 4.5, then send it to Omni image_url
Correct text or a prop in a still with Ideogram 4.5 on Sume, then use the edited image as the Gemini Omni 1.1 Flash first frame. Two jobs, one shot.
Written by Sume