Podcast trailer: redo one part with previous_run_id, not a full rerun
Fix one weak scene in a podcast trailer by continuing the Format run with previous_run_id, so the agent keeps the rest. Rules, refusals and cost.

To change one part of a podcast trailer without paying for a full rerun, send a new Format run with previous_run_id set to the finished run. The Format API treats that as one more turn of the same conversation: Sume replays what the agent produced, so the agent can redo the weak scene and keep the others as they were. The new run has its own id, receipt, spend cap and single webhook.
First run, then continuation
The first call creates the trailer. Which Format you use is your choice; sume-video-hook below is a slug the catalog lists at the sume handle, and you should read it with GET /v1/formats/sume/sume-video-hook before relying on its input shape. The episode_url is a placeholder.
import json, os, urllib.request
def post_run(body, key):
req = urllib.request.Request(
"https://api.sume.com/v1/formats/sume/sume-video-hook/runs",
data=json.dumps(body).encode(),
headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
"Content-Type": "application/json", "Idempotency-Key": key},
method="POST",
)
with urllib.request.urlopen(req) as r:
return json.load(r)["data"]
first = post_run({"instruction": "30 second podcast trailer from this episode.",
"input": {"episode_url": "https://example.com/ep/42"}}, "ep42-trailer-v1")
print(first["id"], first["status"])
The continuation request
After the first run is terminal, post to the same Format with previous_run_id, an instruction that names only the change, and a fresh Idempotency-Key. Bind the same output_schema and primary_output_key again: they are per run and are not inherited. Name the run id, not a thread id; a thread id returns 400 unknown_parameter.
- Instruction example: "Redo the second clip with a calmer opening line. Keep every other clip and the audio unchanged."
- Use a new key such as
ep42-trailer-v2. Reusingep42-trailer-v1with a changed body is409 idempotency_conflict. - Set a smaller
generation_spend_cap_usdthan the first run, because the work is a fraction of it.
When the API refuses
The previous run must be continuable: thread_id is not null, and the run is completed or has at least one artifact. A failed run that left media can be continued.
| Status and code | Meaning | What to do |
|---|---|---|
404 previous_run_not_found | Unknown id, or another owner's run | Check the id and the key |
400 previous_run_format_mismatch | The run started on another Format | Continue on the original Format |
409 previous_run_not_terminal | The run is still going | Poll, then call again |
400 previous_run_not_resumable | No thread, or nothing completed | Start a new run |
What it costs
artifacts[] on a continued run lists all the media the whole conversation made, but usage stays per run. So the receipt of the continuation shows only the spend of that turn against its own cap.
Planning a podcast season
For a season of episodes, give every episode its own base key, such as ep42-trailer-v1, and bump the suffix for each continuation. Store three values in your database for each trailer: the episode id, the latest run id and the key. The next continuation needs the run id of the last good run, and the receipt shows previous_run_id so you can walk back the chain.
One caution: a continuation is a new agent turn, so it can change more than you named. Tell it what to keep, as in the example, and check the new receipt's artifacts against the old ones. If the result is worse, you still have the original run, because a continuation never changes it. Cancel a continuation that you started by mistake with its own cancel_url; you pay only for the generation it completed.
Sources
Related posts
More in Use cases
- Printable 2x8 inch bookmark is 1:4: cost of 6 to 24 designs
A 2x8 in bookmark is 1:4, or 600x2400 px at 300 dpi. Generate it directly with Nano Banana 2.1 on Sume: $0.15 at 2K, $0.20 at 4K per design. Costs for 1, 6, 24.
- Re-cut a Reel at a new pause threshold: the source never changes
First Draft is reversible; your API cut can be too. Sume media jobs never edit the source, so a new threshold is a new cut list and a $0.10 render.
- Re-render 3 of 17 rejected clips: what the retries add on Seedance 2
Seventeen 8-second Seedance 2 clips cost $51.408; re-rolling 3 rejected clips and then 1 more adds $12.096. Failed jobs are released, rejected takes are billed.
- Listing photo to a 10-second tour clip: MiniMax H3 at 768p is $0.75
A 10-second clip from one listing photo costs $0.75 on MiniMax H3 at 768p and $1.00 on H3 Max. The API body, a 12-photo listing total, and what to check.
Written by Sume