Retry a failed 30-second video job on Sume without paying twice
Reuse the same Idempotency-Key when you retry a seedance-2.5 or wan-3.0 submit on Sume; a replay returns the original job. Failed status and error field.

Send the same Idempotency-Key when you retry a submit. Sume's docs say a replay returns the original job, so a timeout on the POST does not start a second 30-second render.
A job that ends failed is different: read the error field, fix the cause and submit a new request with a new key.
Which failures to retry
| Situation | Action |
|---|---|
| POST timed out, no response | retry with the same key |
| status failed, error names a reference URL | fix the URL, new key |
| status failed, error names the prompt | edit the prompt, new key |
| pending for several minutes | keep polling; this is normal for 30 s jobs |
Example
curl -X POST https://api.sume.com/v1/videos \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ad-spot-0017" \
-d '{"model": "wan-3.0", "prompt": "Ad spot, studio light", "duration": 30}'Budget note
Sume reserves the price at submit. At 720p a 30-second Wan 3.0 job reserves about $3.75 and a Seedance 2.5 job about $17.33.
Job states to know
A job moves through pending, in_progress, then completed, failed or cancelled. Only the last three are terminal. Treat pending as normal for a while, because the docs say video generation can take from 30 seconds to several minutes.
On failure Sume reports the problem in the error field.
A safe retry loop
Retry network failures on the submit with the same key and a back-off. Do not loop on a failed job; fix it first. Cap the total attempts per creative.
Log the key, the job id and usage.cost so finance can reconcile.
- One key per creative.
- New key after a fix.
- Cap attempts per creative.
Sources
Related posts
More in Developers
- Retry a failed Format create with the same Idempotency-Key
After a 402 or 503 on a Format create, Sume releases the Idempotency-Key. Fix the cause, then retry with the same key instead of minting a new one.
- Roda: verify a Sume webhook with r.body.read in config.ru
A Roda app in one config.ru that verifies a Sume webhook with OpenSSL HMAC and a length-checked secure compare. Aborts on an empty secret. Tested on Ruby 4.0.
- Rotate the Sume webhook signing secret without dropping a delivery
Upgrade the verifier first, rotate with POST /v1/webhooks/signing-secret/rotate, deploy the new secret inside the 24-hour two-signature window, then confirm it.
- Route Sume run webhooks by event: format, action and agent terminal
Run webhooks use one terminal event per family: action.run.terminal, format.run.terminal, agent.run.terminal. Route on event, then branch on outcome.
Written by Sume