Retry a failed run: same idempotency key returns old failure
Retry a failed run: the same Sume Idempotency-Key returns the old failure. Use a new key, or continue with previous_run_id to keep finished clips.

To retry a failed Sume Format run, send the create again with a new Idempotency-Key. The old key is bound to the receipt you already hold, so reusing it points back at the run that failed. When the failure left clips behind, continue the run with previous_run_id instead of starting over.
Why does the same key not retry?
Two different failures are easy to confuse. A failed create, such as a 402 or 503, means nothing ran and nothing was charged, and the key is released, so the same key is fine after you fix the cause. A failed run is different: the create succeeded, you hold a receipt with status: "failed", and the key belongs to that receipt. A run failure is never a later create error; once you hold a receipt, failures arrive on it.
Which failures should I retry, and how?
Codes from the run-failure table, read 2026-09-29.
| error.code | What the docs say to do |
|---|---|
unattended_blocked | Fix the input or the brief; retry with a new Idempotency-Key. |
mcp_unavailable | Retry with a new key. No generation ran and nothing was billed. |
provider_unavailable | Retry with a new key; the finished clips are on the thread and are not regenerated. |
incomplete_assembly | Continue the run with previous_run_id; finished clips are not regenerated. |
When should I continue instead of retrying?
A failed run can leave real work behind: artifacts[] still lists everything the run generated. Send previous_run_id on a new create and the next turn continues the same conversation, so the agent can redo one part and leave the rest alone. A failed run that left work behind can be continued; one that left nothing cannot, and returns 400 previous_run_not_resumable.
A continuation is a new run with a new id, its own spend cap and its own key, so give it a fresh Idempotency-Key too. Bind the same output_schema on every turn, since it is per run, not inherited.
How do I know the run really failed?
Read status on the receipt. On failure primary_output_url is null, so if (run.primary_output_url) is a safe test for whether the deliverable exists. Treat the code set as open and fall through on codes you do not know. More in the Format errors page.
What is the safest retry sequence?
Read the failed receipt first. Check error.code and artifacts[]. If the code is one the table above marks as retryable and artifacts[] is empty, mint a new key and create again. If clips are on the thread, continue the run so they are not regenerated.
Derive the new key from the same thing being made plus a bumped version, for example the order id with a retry counter, so a network retry of your retry still replays instead of starting a third run.
Set a fresh spend cap on the new run. It is its own run, and a run can never spend past its own effective cap.
Sources
Related posts
More in Developers
- fal.ai API rate limit: concurrency from 2 up to 40
fal.ai limits how many requests run at once, not requests per minute: 2 for a new account, rising with credit purchases to 40 self-serve.
- fal AI FFmpeg API: endpoints, inputs and prices
fal hosts FFmpeg as model endpoints: merge videos, merge audio and video, extract a frame, compose tracks. Called with a fal key, priced per second.
- fal bytedance/seedance-2.0 request fields, mapped to Sume's
Moving a fal Seedance 2.0 call to Sume: the path becomes a bare model id, image_urls become input_references, and seed, auto ratio and auto duration go.
- FFmpeg: add a watermark image to a video with overlay
Add a watermark image to a video with FFmpeg: pass the logo as a second input and use overlay=W-w-10:H-h-10 for the bottom-right corner.
Written by Sume