Edited one ad hook and resent the bulk run? Same key gives 409
Reusing an Idempotency-Key with a changed Sume bulk-run payload returns 409 idempotency_conflict. Send only the edited hook under a new key.

If you edit one hook in a 12-item UGC bulk run and resend it with the same Idempotency-Key, Sume returns 409 idempotency_conflict and names the original queue in details.queue_id. Nothing new is queued. Resend only the edited hook as a one-item bulk run under a fresh key (read 2026-10-08).
The replay rules
The key's scope is one Format. The header wins over a body idempotency_key if you send both. Unlike a single run, a bulk replay stays 202, and the queue has no idempotency_hit field, so a replayed call looks like a normal success: you only notice because the queue id is the old one.
| You send | Result |
|---|---|
Same key, same { concurrency, items } | 202 and the queue that already exists |
| Same key, different payload | 409 idempotency_conflict; details.queue_id names the original |
| New key, any payload | A new queue; every item is a new, billed Format run |
Why a fresh key for the whole list is the wrong fix
A new key creates a second queue, and every item in it becomes a new Format run that spends from the workspace. If 11 of your 12 hooks were already fine, re-sending all 12 pays for 11 duplicates. Each item carries its own generation_spend_cap_usd, which limits one run but does not stop you from paying for a duplicate run twice.
So split the work: keep the first queue running, then send the edited hook alone.
- Queue 1: key
launch-hooks-v1, 12 items, untouched - Queue 2: key
launch-hooks-v1-hook7-edit, 1 item, the edited hook - Cancel the old hook 7 child with
POST /v1/format-runs/{run_id}/cancelif it has not finished
The two calls
Cancelling a child marks that queue item canceled and frees its slot for the next queued item. The Format run API has no public cancel-queue route, so cancel per child. Mint keys with a batch label, never a bare counter, so two people cannot collide.
curl -sS -X POST "https://api.sume.com/v1/formats/sume/sume-close-camera-ugc/bulk-runs" \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: launch-hooks-v1-hook7-edit" \
-d '{
"concurrency": 1,
"items": [
{ "instruction": "Vertical 9:16 UGC ad. New hook for line 7.",
"generation_spend_cap_usd": 15 }
]
}'Check the result the right way
A queue is completed when every item is terminal, which is not the same as success. Read counts.failed and counts.canceled, then open the child run at GET /v1/format-runs/{run_id} for the reason. A 429 or 503 while polling is transient and the queue keeps draining, so back off rather than resubmit.
Sources
Related posts
More in Formats
- Format run incomplete_assembly: continue it, do not pay twice
incomplete_assembly means the run hit its time limit with generation jobs unfinished. Read pending_job_count, then continue with previous_run_id.
- Format run mcp_unavailable: failed before the model, charged false
mcp_unavailable means the per-turn tools never attached, so the run stopped before any turn. details.charged is false. Retry with a new Idempotency-Key.
- output_extraction_failed: harvest_unavailable or harvest_threw?
output_extraction_failed has two reasons with opposite handling: reread a completed run, or report a host defect. Here is how to tell them apart.
- primary_output_missing: your schema passed but the key is empty
A Format run can satisfy your output_schema and still fail because primary_output_key is empty. Here is how to read it and fill the gap.
Written by Sume