Three blind retries of a 30 s Seedance 720p submit can reserve $52.00
Without an Idempotency-Key, a timeout and two retries on one 30 s Seedance 2.5 clip can book $52.002. The same loop with one key, in curl, plus Wan 3.0 totals.

A 30 s Seedance 2.5 clip at 720p costs $17.334, so a submit that times out and is retried twice with no Idempotency-Key can book 3 x $17.334 = $52.002 for one video. The docs are direct about it: never resubmit a paid job just because the local client timed out, and a 5xx does not prove the work was refused.
Exposure by attempt
Sume reserves the provider list price times 1.25 at submit. If the first request actually created a job and the retry carries no key, each retry is a new paid job. The worst case below assumes every attempt is accepted.
With one Idempotency-Key reused on every attempt, the retry returns the original job instead, so the exposure stays at one attempt.
| Attempts, no key | Seedance 2.5 720p ($0.5778/s) | Wan 3.0 720p ($0.125/s) | Wan 3.0 1080p ($0.25/s) |
|---|---|---|---|
| 1 | $17.334 | $3.75 | $7.50 |
| 2 | $34.668 | $7.50 | $15.00 |
| 3 | $52.002 | $11.25 | $22.50 |
The same loop with one key
Generate the key once, outside the loop, and send it on every attempt. The body must stay identical: the same key with a different body returns 409 idempotency_conflict.
KEY=$(uuidgen)
BODY='{"model":"seedance-2.5","prompt":"A slow dolly shot through a neon market","duration":30,"resolution":"720p","aspect_ratio":"9:16"}'
for i in 1 2 3; do
curl -sS -m 30 -X POST https://api.sume.com/v1/videos \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Idempotency-Key: $KEY" \
-H "Content-Type: application/json" \
-d "$BODY" && break
sleep $((i * 5))
doneGotchas
A 402 insufficient_credits means no job was started, so it is the one failure you can retry after a top-up with no duplicate risk. A 429 or 503 is retried with the same key. If you lose the key, list your jobs and match on the idempotency_key field that every job object carries, before you submit anything new.
The curl exit code only covers transport errors; add -w '%{http_code}' if you also want to branch on 4xx responses.
Sources
Related posts
More in Developers
- Total usage.cost for Sume video job ids with curl, jq and awk
One shell pipeline: read job ids from a file, GET /v1/videos/{id} for each, keep completed jobs, and sum usage.cost with awk. No Python or Node needed.
- Transcribe a 15-second voice note in one request: STT sync mode
Sume STT can answer in the same HTTP call: mode sync with wait_timeout_seconds up to 30 returns 200, otherwise 202 and a poll. A $0.01 minimum, with curl.
- Transcribe the first 60 seconds of 500 support recordings
500 screen-recorded support sessions: detach seconds 0 to 60 ($5.00), then STT 60 s each ($5.00). Total $10.00 at $0.01 per job and per minute.
- Trim 12 Shorts from one recording with asyncio and a semaphore
Cut 12 Shorts from one recording with asyncio and httpx: 12 trims at $0.02 is $0.24. A semaphore of 4 caps in-flight requests; the limit is your choice.
Written by Sume