n8n Retry On Fail: retry paid API calls without paying twice
n8n's Retry On Fail reruns a failed node up to Max Tries. For a paid API call, send the same Idempotency-Key and body on every try.

n8n's Retry On Fail setting reruns a node after a failed execution until it succeeds or reaches Max Tries, waiting Wait Between Tries (ms) between attempts. On an HTTP Request node that starts paid work, it's safe only when every try sends the same Idempotency-Key and the same body, so a rerun gets the original job back instead of a second charge. Errors a rerun can't fix, such as a bad request or an empty balance, just burn the tries.
n8n facts come from its node settings, HTTP Request node, HTTP Request common issues, rate limits and expressions pages. The paid API is Sume's, from Create a run, Video Generation, Errors and rate limits and Authentication. All were read on 2026-09-29. Sume has no n8n node; this is the HTTP Request node calling its API.
How do I turn on Retry On Fail in n8n?
Open the node, select Settings, and turn on Retry On Fail. Then check the settings around it, because they decide what counts as a failure and what happens after the last try.
| Setting | What n8n's docs say | For a paid create |
|---|---|---|
| Retry On Fail | When an execution fails, the node reruns until it succeeds | On, with a stable Idempotency-Key |
| Max Tries | The maximum number of times n8n should retry the node | Small: every try of a refused call fails the same way |
| Wait Between Tries (ms) | Delay between retries; for a rate limit, more than the limit (1000 for one request per second) | At least the API's rate window |
| Never Error (HTTP Request) | Off by default: the node returns success only on a 2xx | Leave off, so a 4xx or 5xx fails the node |
| Timeout (HTTP Request) | Milliseconds to wait for response headers; longer requests are aborted | A timeout fails the node and triggers a retry |
| On Error | Stop Workflow, Continue, or Continue (using error output) | Error output to route refusals to your own branch |
Can Retry On Fail create duplicate paid jobs?
Yes, when the first try reached the API but n8n never saw the answer, for example after a timeout. The server may already be running the job, and the retry asks for another. The fix is on the request: send an Idempotency-Key header built with an expression from the item's own data, such as {{$json.row_id}}-video-v1. Sume's docs say to derive it from the thing being made, not from the moment of asking, so never use the current time or a random UUID per run.
On Sume's /v1/videos, a replay with the same key and body returns the original job, and in current code the same key with a different body is refused with 409 idempotency_conflict. So an expression that pulls in a changing value, such as a timestamp in the prompt, breaks the replay. Idempotency keys for AI video APIs lists every replay answer.
Which errors should n8n not retry?
n8n's docs describe Retry On Fail with only two settings, Max Tries and Wait Between Tries, so every failed attempt is retried the same way. Keep Max Tries small, or set On Error to Continue (using error output) and send failures to your own branch. Sume's errors say which reruns can help:
- Worth retrying: a network error or timeout (same key and body), and
429 rate_limitedafterretry-after. - Not worth retrying:
400 invalid_requestand409 idempotency_conflict(fix the request),401 unauthorized(check the key; sending bothAuthorizationandx-api-keyis also a 401), and402 insufficient_credits(add funds). - Not with the same key: in current code, a same-key resend after
429 queue_fullor503 provider_capacity_exceededreturns that stored refusal again.queue_fullmeans no new paid job fits until an existing one finishes or is canceled, so wait for that, then send a new key.
What should happen when every try fails?
With On Error set to Stop Workflow, the execution fails and, if you've set one, your error workflow runs. n8n error workflow for a failed API job covers the other half: a job that was accepted and later ends failed never fails the HTTP node at all. Idempotency keys for AI video APIs covers key design beyond n8n.
Sources
- Create a run
- Video Generation
- Errors and rate limits
- Authentication
- n8n docs: Node settings (read 2026-09-29)
- n8n docs: HTTP Request node common issues (read 2026-09-29)
- n8n docs: HTTP Request node (read 2026-09-29)
- n8n docs: Handling API rate limits (read 2026-09-29)
- n8n docs: Expressions (read 2026-09-29)
Related posts
More in Integrations
- Automate video editing with n8n: caption and cut by API
Automate video editing with n8n: an HTTP Request node submits a caption or cut job, a Wait node resumes on the webhook, a last node reads the file.
- n8n webhook timeout: respond immediately, then do the work
On n8n Cloud a webhook that hasn't answered in 100 seconds fails with a 524. Set Respond to Immediately, do the slow work after, and dedupe sender retries.
- p-retry npm: retry a paid API POST and stop on errors
p-retry reruns an async function with exponential backoff. Throw AbortError on answers a resend can't fix, and keep one Idempotency-Key per job.
- PHP cURL POST JSON with a Bearer token
json_encode the body, pass the string to CURLOPT_POSTFIELDS, set Content-Type and Authorization headers, then check the status: cURL won't fail on a 4xx.
Written by Sume