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: 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.
- Skincare routine clip at 3:4: Seedance 2.5, $6.98 for 12 seconds
Seedance 2.5 has no 4:5 ratio on Sume. Render 3:4 at 834x1112 for $6.98 (12 s, 720p) and crop to 4:5 for the feed. Prices at 480p and 1080p too.
- Slow-motion water splash prompt for Gemini Omni: what 'slow' does
Prompt a slow-motion splash in Gemini Omni: how to word the speed, why a 5-second clip is enough, and what 360p, 720p and 1080p cost on Sume.
Written by Sume