> For the complete documentation index, see [llms.txt](https://docs.pletor.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pletor.ai/build-agents/studio/loop-mode.md).

# Loop mode

Loop Mode lets you process multiple inputs through the same node chain automatically — one at a time. Instead of generating a single output per run, the node iterates over each input and produces a separate output for each one.

It's the fastest way to scale your workflows without duplicating nodes or running your agent manually for every asset.

***

### How it works

When Loop Mode is **off**, a node takes all its connected inputs and produces one output per run.

When Loop Mode is **on**, the node processes each input individually through the downstream chain. If you connect 10 images, the node runs 10 times — once per image — and produces 10 separate outputs.

You'll find the **Loop Mode** toggle in the top-right corner of the Inputs section in any node's configuration panel.

<figure><img src="/files/8qq4bvz9IVwMSv4kCO4V" alt="" width="325"><figcaption></figcaption></figure>

***

### Where Loop Mode appears

Loop Mode is available on most nodes that accept inputs, including:

* **AI Image nodes** (Generate Image, Edit Image, etc.)
* **AI Video nodes** (Generate Video, etc.)
* **Import from Google Drive**
* **Text Assistants**

When connected inputs have Loop Mode enabled, they show a **Loop** badge next to the input pill in the configuration panel.

<figure><img src="/files/Q3v445c1xLkwCrxE5DzS" alt=""><figcaption></figcaption></figure>

***

### Per-input loop control

When a node has multiple inputs, you can enable Loop Mode independently on each one. This gives you fine-grained control over which inputs iterate and which stay fixed.

**Example:** In a Generate Image node with Loop Mode on:

* **Text prompt** → connected to a fixed prompt instruction (Loop off) — the same prompt is used for every iteration.
* **Reference image(s)** → connected to Import from Google Drive (Loop on) — each imported image is processed one at a time.

This means: one prompt × N images = N outputs, each using a different reference image but the same instructions.

***

### Common Loop Mode patterns

#### Batch product shots from Google Drive

Import product photos from a Drive folder, generate a styled variation of each one, and export back to Drive.

**Flow:** Text Prompt (folder URL) → Import from Google Drive → Text Prompt (fixed instructions) → **Generate Image** (Loop Mode on for reference images) → Export to Google Drive

Each product photo gets its own generation. The fixed prompt applies the same styling to every image.

[→ Try this template](https://app.pletor.ai/flow/346c73f3-08ff-46eb-bc7e-3dc523977f33) (fashion)

[→ Try this template](https://app.pletor.ai/flow/c5bef676-5137-4145-b397-52004cc45f51) (furniture)

#### Multiple headline variations

Use a Text Assistant to generate several headline options, split them, and generate an image for each one.

**Flow:** Text Prompt (brief) → Text Assistant (generate 5 headlines) → Split Text → **Generate Image** (Loop Mode on for text prompt)

Each headline becomes a separate image generation.

#### Multi-format adaptation

Take one source image and generate it in multiple aspect ratios for different platforms.

**Flow:** Upload Image → **Change Aspect Ratio** (Loop Mode on) with multiple target ratios

One input, multiple format outputs — ready for Instagram, Stories, and landscape.

***

### Cost and performance

Each loop iteration counts as a separate run and consumes credits independently. The **run cost** shown in the configuration panel reflects the cost per iteration — multiply by the number of inputs to estimate total cost.

Loop Mode processes inputs sequentially (one at a time), not in parallel. Larger batches take proportionally longer.

***

### Tips

* **Start with a small batch.** Test your Loop Mode workflow with 2-3 inputs first to make sure the outputs look right before running it on a full folder of assets.
* **Combine with Google Drive for end-to-end automation.** Import → Loop → Export is the core pattern for batch processing at scale.
* **Use fixed prompts alongside looped inputs.** The power of Loop Mode is applying the same instructions to many different assets — keep your prompt constant and let the inputs vary.
* **Check the run cost before launching large batches.** A 15-credit node × 50 looped inputs = 750 credits per run.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pletor.ai/build-agents/studio/loop-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
