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
- Sume video content 409: job_not_completed vs job_failed in Python
A 409 from /v1/videos/{id}/content means two things. job_not_completed is retryable, job_failed is not. Here is a Python handler that tells them apart.
- 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.
- Filter the Sume video catalog in Python for 1080p and audio references
Instead of guessing which video model takes what, read GET /v1/videos/models and filter it. This Python script lists models with 1080p and audio_url references.
- Find gpt-image-1 in your repo before Oct 23: a Python scan
OpenAI shuts gpt-image-1 down on 2026-10-23, five weeks before the other GPT Image ids. A Python scan splits them by date and maps each hit to a Sume model id.
Written by Sume