Seven vertical AI videos a week: a stdlib Python batch with keys
A short Python script that submits seven 9:16 video jobs to Sume with Idempotency-Keys, so a rerun never bills a second job. Standard library only.

To make seven vertical AI videos a week, submit one POST /v1/videos job per day with a stable Idempotency-Key built from the week and the day, so rerunning the script returns the original jobs and bills nothing extra. The script below uses only the Python standard library, and submits the jobs without waiting for them.
The request shape and the retry rule are from the video guide and Jobs and results: the same key on a retry returns the original job instead of a second paid one.
The script
import json, os, urllib.request
API = "https://api.sume.com/v1/videos"
KEY = os.environ["SUME_API_KEY"]
WEEK = "2026-w41"
BRIEFS = [
"Product pack on a desk, slow push-in, morning light",
"Hands opening the pack, close-up, natural sound",
"The product in use at a kitchen counter",
"Before and after on a clean white background",
"Customer-style unboxing, handheld feel",
"Detail shot of the label, shallow depth",
"Closing shot with the pack centered",
]
def submit(day, prompt):
body = json.dumps({"model": "seedance-2", "prompt": prompt,
"aspect_ratio": "9:16", "duration": 8}).encode()
req = urllib.request.Request(API, data=body, method="POST", headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
"Idempotency-Key": f"{WEEK}-day-{day}"})
with urllib.request.urlopen(req) as r:
return json.load(r)
for day, prompt in enumerate(BRIEFS, start=1):
job = submit(day, prompt)
print(day, job["id"], job["polling_url"])How it behaves
Each day gets its own key, so seven different jobs are created on the first run. Run it again and the same keys return the same seven jobs. Change the prompt for a day without changing its key and you are asking for the old job, so change the key when the intent changes.
| Item | From the docs |
|---|---|
| Submit | POST /v1/videos returns 202 with id, polling_url, status and model |
| Model | seedance-2 takes 4 to 15 seconds and lists 9:16 |
| Retry | The same Idempotency-Key returns the original job and bills no second job |
| Result | Poll the polling_url until completed, then GET /v1/videos/{id}/content |
Before you run it
Replace the seven briefs with your own. Confirm the model and the duration with GET /v1/videos/models, since limits differ by model. The poll response reports usage.cost for each job, so total those numbers after the first batch to learn the real weekly cost before you commit.
Then poll and review
This script only submits. Poll each polling_url until completed, or use a webhook; see the approval gate post for a verified one. For an async httpx version with many shots, see 16 shots to 16 jobs. Review each file and disclose AI use on every platform before it posts.
Sources
Related posts
More in Use cases
- Shorts-only YouTube playlists can't be reordered: render in order
YouTube's playlist help says reordering is unavailable for Shorts-only playlists. Fix episode order before upload and render in order with fixed keys.
- Shorts series season of 30-second AI episodes: cost per season
A 10-episode YouTube Shorts series of 30-second AI episodes costs $37.50 on Wan 3.0 at 720p and $80.60 on Seedance 2.5 at 480p, one job each.
- Shorts series: serial or non-serial for AI episodes
Shorts series can be serial (oldest first) or non-serial (newest first). Which suits AI episodes, and how Sume jobs differ for each, per YouTube Help.
- How do I caption a silent micro-drama for Shorts with overlay cues?
Send authored text as cues with start and end times to the Sume caption job. A silent clip fails speech captions with caption_no_speech, so use cues.
Written by Sume