Format bulk queue: no queue webhook, no cancel-queue endpoint
A Sume bulk queue has no webhook and no cancel call. Poll the queue, put webhooks on items, and cancel the child runs one by one with their run ids.

A Sume Format bulk queue has no webhook and no cancel endpoint. Poll GET /v1/format-run-queues/{queue_id} for progress, register communication.webhook_url on each item for completion, and stop a batch by canceling its child runs one at a time. The Bulk runs docs are explicit on all three.
Knowing this before you queue 100 items saves you from looking for controls that do not exist.
Which controls exist on a queue?
The queue is a server-side list of ordinary Format runs with a concurrency window of 1 to 16, not a different engine.
| Need | Available? | Use instead |
|---|---|---|
| Queue-level webhook | No | communication.webhook_url per item |
| Cancel the queue | No public endpoint | POST /v1/format-runs/{run_id}/cancel per child |
| List queues | No public endpoint | Store the frq_ id from the create |
| Queue progress | Yes | Poll status_url; read counts |
| Per-row failure reason | On the child receipt | GET /v1/format-runs/{run_id} |
How do I stop a batch?
Canceling a child marks that item canceled and frees its slot for the next queued item, which means canceling running children alone just lets the window start new ones. To stop the whole batch, you must also stop the queued items. The docs describe no call for that, so plan for it: keep batches small enough that you could let one finish, and give each item its own spend cap.
What you can do is cancel the children that already have a run_id. This lists them from the queue and cancels each:
QUEUE_ID="frq_..."
curl -sS "https://api.sume.com/v1/format-run-queues/$QUEUE_ID" \
-H "Authorization: Bearer $SUME_API_KEY" \
| jq -r '.data.items[] | select(.status == "running") | .run_id' \
| while read -r RUN; do
curl -sS -X POST "https://api.sume.com/v1/format-runs/$RUN/cancel" \
-H "Authorization: Bearer $SUME_API_KEY" | jq -r '.data.cancel_effect'
doneWhat does completed mean?
Queue completed means every item is terminal, not that every item succeeded. Branch on counts.failed and counts.canceled. A failed item shows only a coarse error such as format_run_failed; the reason is on the child receipt. An item that never started a run keeps its index with run_id: null and the create-run failure in error, and the rest of the queue continues.
What about the idempotency key?
Mint a fresh Idempotency-Key per batch. A replay with the same { concurrency, items } returns 202 and the old queue, with no idempotency_hit field, and the same key with a different payload is 409 idempotency_conflict with details.queue_id naming the original. Keys are scoped to one Format.
Canceled children never send a webhook, so a webhook-only batch needs the queue poll to see them. For recovering failures, see retrying failed items.
How should I size a batch given these limits?
Since you cannot cancel a queue, the size of the batch is your only brake. The queue accepts 1 to 100 items and a concurrency window of 1 to 16, and each item is a normal run with its own spend cap and its own webhook. A bad item fails the whole create with 400 invalid_request and a details.index, before any queue exists, so nothing is dispatched or charged for a malformed list.
- Put a
generation_spend_cap_usdon every item so the worst case is a known sum. - Split a large sheet into several queues, each with its own
Idempotency-Key, so you can stop between them. - Store the
frq_id and eachrun_idas you read them: there is no list-queues call. - Poll the queue with backoff; the read budget is separate from create, and a
429or503does not mean the queue stopped.
Sources
Related posts
More in Formats
- Format Contents API: read the whole package, commit many files at once
Read a Sume Format package with ?recursive=1 and write several files as one commit and one version bump. A change set, not the package; deletes stay separate.
- Why your order_id comes back null in a Sume structured output
If a Sume run's filled_by is projection, the fallback never sees your input or instruction, so an order_id you sent comes back null. Keep ids on your side.
- Optional field in a Sume Format output_schema: use a null union
A Sume output_schema has no optional properties. List every key in required and give optional ones a type of ["string","null"], or the create fails with 400.
- output_schema_unsatisfied with rejected_urls: the Sume URL gate
A Format run that returns output_schema_unsatisfied and rejected_urls named a media URL it did not generate. How the URL gate works and how to fix the schema.
Written by Sume