Weekly series drop: on_active_run reject stops a second render
Set on_active_run to reject and a second episode run on the same Format answers 409 format_run_in_progress instead of starting. skip records a skipped run.

Send on_active_run: "reject" on the create call and Sume will answer 409 format_run_in_progress when a run of that Format is already in flight, instead of starting a second one. For a weekly series that is the guard you want: if the Friday job fires twice, or someone clicks run while episode 9 is still rendering, the second request fails fast and costs nothing. The default is allow, which runs both at once.
The three values
| Value | What happens when a run is already in flight |
|---|---|
allow (default) | The new run starts concurrently; workspace generation concurrency still applies |
skip | Sume records a run with status skipped |
reject | The request answers 409 format_run_in_progress and no run is created |
Which one for a series
Use reject for a human or script that decides to make an episode: you want to know it did not start. Use skip for an unattended schedule where a missed week is acceptable, and read the docs note that Scheduled Actions default to skip, so do not copy their bodies into API calls. Keep allow for anything that is meant to overlap, such as separate series on separate Formats.
This guard is per Format. If your season runs several Formats, one for the script, one for the video, each has its own in-flight check.
A weekly series is the textbook case for a guard because the cost of a double fire is a second full episode of generation. The check happens at create time, so a rejected call has no run and no spend, and your script can log the 409 and exit. If instead the previous episode is stuck, look at that run's status first; do not loop on the rejection.
The call
This request asks for episode 9 and refuses to overlap. Replace the handle and slug with your Format's address, and give the episode number its own Idempotency-Key so a retry returns the original run instead of a new one.
curl -sS -X POST "https://api.sume.com/v1/formats/YOUR_HANDLE/YOUR_SLUG/runs" \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: season-1-episode-9-v1" \
-d '{
"instruction": "Render episode 9 from the season outline.",
"input": { "season": 1, "episode": 9 },
"on_active_run": "reject"
}'Two things it does not do
First, reject and the idempotency key answer different questions. The key says 'this exact request already happened', and a replay returns the original run with idempotency_hit: true. The guard says 'another run of this Format is happening now'. Use both.
Second, a bulk queue ignores the field on its items: every child runs with allow so that the window can fill. If you want episodes to be strictly one at a time, set the queue's concurrency to 1 rather than putting reject on each item.
Cancel is the other half of the story: if an old run really is stuck, POST /v1/format-runs/{id}/cancel stops it, after which a new run is accepted. Read the run's cancelable flag before calling it.
Sources
Related posts
More in Formats
- Which Sume catalog Formats make ad creative: the slugs by ad type
Sume ships 27 ready-made Formats at the sume handle. Which slugs fit which ad type, and how to read one with GET /v1/formats/sume/{slug} before paying.
- Ready-made Formats for product video: the Sume Format catalog
Sume ships ready-made Formats for product and UGC-style video and images, each callable from your backend with one HTTP request at the reserved sume handle.
- What is a Sume Format? Turn an agent thread into one API call
A Sume Format is a saved video recipe your backend calls by handle and slug. One POST runs it in a fresh sandbox and returns media plus optional typed JSON.
- How to embed AI video generation in your product with Sume Formats
To embed AI video generation, your server holds one Sume API key and runs a Format per customer, with a derived Idempotency-Key, spend cap, and webhook.
Written by Sume