Which failed Format runs can you retry without paying twice?
A decision table for failed Sume Format runs: which codes mean retry, which mean continue with previous_run_id, and which mean fix your input first.

A failed Format run is safe to retry without paying for finished clips again when the docs say the clips stay on the thread: provider_unavailable, incomplete_assembly, agent_reported_failure and output_extraction_failed with harvest_threw. For those, continue the run with previous_run_id or retry with a new Idempotency-Key, and read the error table below before choosing.
Two other groups need a different response. Input problems (unattended_blocked, output_schema_unsatisfied) fail again until you change something, and a spend-cap stop (format_run_failed) needs a bigger cap or a smaller brief. The source for every row is the Errors and spend page.
The decision table
Branch on error.code after you have checked status. The set of codes is open, so keep a fallback for codes you have not seen.
| error.code | What it means | Documented next step |
|---|---|---|
| unattended_blocked | Stopped at a gate no person was there to pass | Fix the input or brief, retry with a new key |
| output_schema_unsatisfied | Result did not match your schema, or named media the run never made | Make the field nullable or change the instruction |
| deliverable_missing | The Format declares media output but the run made none | Retry once; if it repeats, the input is wrong |
| agent_reported_failure | Run said it did not deliver; clips on the ledger are real | Continue the run, or re-fire with a new key; no regeneration of those clips |
| incomplete_assembly | Time limit hit before all generation jobs finished | Continue with previous_run_id |
| mcp_unavailable | Tools did not attach; no generation ran, nothing charged | Retry with a new key |
| provider_unavailable | Model stream stopped; not caused by your input | Retry with a new key; finished clips are not regenerated |
| provider_credits_exhausted | Sume's provider account ran out of credit | Do not re-fire at once; wait for restore |
| format_run_failed | Generic; includes hitting the spend cap | Compare billable amount with the cap |
Continue or re-fire
A continuation is a new run with its own id, its own receipt and its own spend cap. You name the earlier run with previous_run_id; a thread id is rejected as an unknown parameter. The earlier run must be continuable: it has a thread_id and either completed or left artifacts. Bind the same output_schema again, because it is per run and not inherited.
Re-firing with a new Idempotency-Key also creates a new run. The old key stays tied to the receipt you already have, so replaying it returns the failed run instead of trying again. That is the single most common mistake in retry loops.
What you are charged for
The docs say you pay for generation that finished before a failure or cancel, and that a later failure does not refund it. A 4xx at create, an idempotent 200 replay and a skipped run cost nothing. usage.billable_amount_usd_micros counts generation spend, not the agent's own model turn, so use usage.debited_usd_micros when you want the amount the wallet really deducted.
For format_run_failed, compare usage.billable_amount_usd_micros with usage.generation_spend_cap_usd_micros before you raise the cap. A run that tried to spend past its cap fails with this generic code, and the cap is the control you own.
A small retry policy
Put the table into code as three buckets, not nine branches.
- Continue:
incomplete_assembly,agent_reported_failure, and any failure where the receipt still lists usefulartifacts[]. - Retry with a new key after a pause:
provider_unavailable,mcp_unavailable,deliverable_missing(once). - Stop and alert a person:
unattended_blocked,output_schema_unsatisfied,provider_credits_exhausted, and every unknown code.
Sources
Related posts
More in Formats
- Which Format version ran my API call? Check the receipt
Every Sume Format run receipt carries format.version. Read it after you edit a package, so a bulk batch or schedule is never judged against the wrong version.
- 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