Retry a Format 402 with the same Idempotency-Key after adding funds
A 402 at create means nothing ran and the key was released. Add funds, then resend with the same Idempotency-Key. A replay costs nothing.

Yes, reuse the same Idempotency-Key. The Format call guide says that after a create that failed with 402, Sume released the key, so you correct the cause and retry with the same key. Nothing ran on the 402, so there is no charge to reverse.
What each outcome costs
The Format errors page lists two money gates. The wallet is checked at create, and the spend cap applies during the run. A 402 belongs to the first gate.
| Situation | Status | What happened | Cost |
|---|---|---|---|
| Wallet cannot fund the run | 402 insufficient_credits | Nothing ran; next_action is add_funds | Nothing |
| Organization wallet missing | 402 organization_wallet_not_provisioned | An admin must fund it | Nothing |
| Same key, same body, run already accepted | 200 with idempotency_hit: true | Original receipt returned | Nothing |
| Same key after a failed create | Retry allowed | Key was released | Normal run price |
The retry sequence
Follow the order below. Do not generate a new key unless you want a second run.
- Read
next_action; forinsufficient_creditsit isadd_funds. - Top up in the dashboard. The public Developer API gives balance and usage reads, but no top-up endpoint.
- Resend the same request body with the same Idempotency-Key.
- If the key is reused with a different body or operation, expect
409 idempotency_conflictand no run.
Handling it in code
The SDK runs page shows a catch for SumeRunRequestError that checks status === 402 or code === "insufficient_credits", then alerts with the request id. Keep the idempotency key beside the job in your own queue, so the retry after a top-up reuses it. A key belongs to one Format, so sending it to a second Format starts a second run.
A worked example
A nightly job creates 30 runs with keys order-1001-v1 to order-1030-v1. At run 19 the wallet is empty and create returns 402. Runs 1 to 18 are accepted and keep their receipts. After a top-up, the job resends the same key for run 19 and continues to 30. If the job were to restart from run 1 with the same keys, runs 1 to 18 return 200 with idempotency_hit: true and no second charge.
This is why the docs advise deriving the key from the item and a version, not from the time. Bump the version, for example to -v2, only when you want a real re-run of that item.
- Keys are up to 255 characters.
- A key's scope is one Format.
- A random uuid per request disables the protection.
Sources
Related posts
More in Pricing
- Reuse one avatar for 40 clips: the $0.95 fee is paid once
Avatar creation is $0.95 once. Forty 15 second plus clips add $147.00; recreating the avatar for each clip would waste $37.05.
- Seedance 2.5: nine prices for 10, 20 and 30 second clips
Seedance 2.5 on Sume at 10, 20 and 30 s across 480p, 720p and 1080p: from $2.69 to $42.65 per clip, with the arithmetic behind the spread.
- Seedance 2.5 1080p is 2.46x the cost of 720p: why
Seedance 2.5 1080p costs about two and a half times 720p per second on Sume. The pixel count, the higher 1080p token rate, and the other Seedance tiers.
- Seedance 2.5 30-second clip: price at 480p, 720p and 1080p
A full 30-second Seedance 2.5 clip in 16:9 costs $8.0603 at 480p, $17.334 at 720p and $42.6465 at 1080p through Sume.
Written by Sume