n8n Loop Over Items: batch paid API calls under a rate limit
n8n's Loop Over Items node sends items through in batches of Batch Size, then emits all results on done. Pair it with Wait to pace a paid API.

n8n's Loop Over Items node (formerly Split in Batches) keeps the incoming items, returns Batch Size of them through its loop output on each pass, and, when every item is processed, returns all the processed data through its done output. Put the API call on the loop branch and a Wait node before the loop closes, and you control how many requests go out and how fast.
The n8n facts come from n8n's Loop Over Items, Looping and Handle rate limits pages. The Sume limits come from Authentication and Generation admission. All were read on 2026-09-29. Sume has no official n8n node; each call is a plain HTTP Request.
Do I need Loop Over Items at all?
Often not. n8n's docs say nodes are designed to process a list of input items by default, so an HTTP Request node after a list already sends one request per item. The node earns its place in three cases the docs name: looping until all items are processed under your control, nodes that run only once (the docs list, for example, RSS Read and a Code node in Run Once for All Items mode), and avoiding rate limits.
For pacing alone, the HTTP Request node has a Batching option (Items per Batch, Batch Interval in milliseconds). n8n calls it the equivalent of Loop Over Items plus Wait. Use the loop instead when each batch needs more than one step, such as submit and then check.
How do I wire the loop and the done branch?
The node has two outputs. The loop output carries the current batch; the done output fires once, at the end. A typical paced call looks like this:
- Loop Over Items, Batch Size set to how many requests one pass may send. Batch Size 1 processes items one at a time.
- On the loop output: HTTP Request (POST) with an
Idempotency-Keybuilt from the item, then any bookkeeping. - A Wait node after the API call, connected back to Loop Over Items. This is the pattern n8n's rate-limit page shows.
- On the done output: the step that runs once, after every batch, with all processed items combined.
- You don't need an If node to end it: n8n says the node stops once all items have been divided into batches and passed on. That changes if you turn on Reset, which needs a termination condition you write, or the loop never ends.
Idempotency-Key: {{ $json.sku }}-video-v1
Authorization: Bearer (from an n8n credential)
POST https://api.sume.com/v1/videosWhich n8n setting paces what?
Every pacing control in n8n is a count or a clock. None of them waits for a job on the API's side to finish.
| Setting | Where | What it controls |
|---|---|---|
| Batch Size | Loop Over Items | The number of items returned with each call of the loop output |
| Reset | Loop Over Items option | Treats incoming data as a new set each time; needs a termination condition |
| Items per Batch | HTTP Request, Batching option | The number of input items in each batch |
| Batch Interval | HTTP Request, Batching option | The time between batches, in milliseconds; 0 for none |
| Wait node | After the API call, wired back to the loop | A pause between passes |
How big should each batch be for a paid API?
Size it to two limits: the request rate and how much paid work the API holds at once. For Sume they are separate. Each key gets a per-minute write budget by plan, with reads in a separate bucket. Paid generation jobs are admitted queue-first, and a submit past processing plus queue capacity fails with 429 queue_full. Video job concurrency and queueing lists both limits per plan.
For video, the job cap can bind long before the rate does. On Free, the write budget is 120 a minute, but only 6 jobs can be accepted at a time. A batch of 10 would get queue_full on the seventh submit while the first six are still queued or processing, and a timed Wait doesn't help.
How do I keep the loop inside those limits?
Make each pass wait for work to finish, not for a fixed time. n8n Google Sheets AI avatar video shows how to size a batch from Sume's in-flight budget and how to poll one job without an endless loop.
- Set Batch Size at or under that budget, for example the plan's processing concurrency.
- Inside the pass, submit the batch, then poll the jobs until they are terminal before looping back.
- Read
ratelimit-remainingand back off onretry-after; a429names the budget inerror.details.scope. - Key every item from its own data. Sume's video docs say a replay with the same
Idempotency-Keyreturns the original job; a new key per run turns a rerun of the loop into new paid jobs. - Don't count on a same-key retry after
queue_full. Keeping batches inside capacity is what prevents it.
Sources
Related posts
More in Integrations
- 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.
- 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.
Written by Sume