---
url: /orchestration/reference/operations/InvokeRepeatStepTemplate.md
description: 'POST /v2/consumer/recipes/repeat — Repeat workflow step'
---

> Documentation index: https://developer.civitai.com/llms.txt — every page on this site has a markdown version at its URL + `.md`.

# Repeat workflow step

`POST https://orchestration.civitai.com/v2/consumer/recipes/repeat`

Operation `InvokeRepeatStepTemplate` · Recipes · Civitai Orchestration API, generated from the published OpenAPI spec ([v2-consumers.json](https://developer.civitai.com/openapi/v2-consumers.json)); the interactive HTML page is this URL without `.md`.

## Authentication

Send `Authorization: Bearer <token>` (the spec's `ApiKey` scheme); this operation documents `401 Unauthorized` for a missing or invalid token. See [Authentication](https://developer.civitai.com/orchestration/guide/authentication.md).

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `experimental` | query | boolean | no |  |
| `allowMatureContent` | query | boolean | no |  |
| `whatif` | query | boolean | no |  |
| `ephemeral` | query | boolean | no |  |
| `tier` | query | `WorkflowTier` (one of `paid`, `free`) | no | How a workflow is paid for. |

## Request body

Optional. Content types: `application/json`, `text/json`, `application/*+json`.

Schema `RepeatInput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `for` | `RepeatForClause` | yes | The "for" clause that specifies what array to iterate over and how to reference items. |
| `template` | `WorkflowStepTemplate` | yes | The template of the workflow step to execute for each item in the iteration. |

### Types used by the request body

#### RepeatForClause

Schema `RepeatForClause`.

| Field | Type | Required | Description |
|---|---|---|---|
| `$ref` | string | yes | The dynamic assignment reference to the array to iterate over (e.g., "$stepName"). |
| `path` | string | yes | The path to the array property in the referenced step's output (e.g., "output.frames"). |
| `as` | string | yes | The variable name to use when referencing the current iteration item in template steps (e.g., "frame"). |

#### WorkflowStepTemplate

Schema `WorkflowStepTemplate`.

Polymorphic: the `$type` field selects the concrete type — `aceStepAudio` → `AceStepAudioStepTemplate`, `audioCaptioning` → `AudioCaptioningStepTemplate`, `audioModeration` → `AudioModerationStepTemplate`, `blobArchive` → `BlobArchiveStepTemplate`, `chatCompletion` → `ChatCompletionStepTemplate`, `comfy` → `ComfyStepTemplate`, `comfyNodepackSnapshot` → `ComfyNodepackSnapshotStepTemplate`, `composeMedia` → `ComposeMediaStepTemplate`, `convertImage` → `ConvertImageStepTemplate`, `customComfy` → `CustomComfyStepTemplate`, `imageBackgroundRemoval` → `ImageBackgroundRemovalStepTemplate`, `imageGen` → `ImageGenStepTemplate`, `imageResourceTraining` → `ImageResourceTrainingStepTemplate`, `imageToSvg` → `ImageToSvgStepTemplate`, `imageUpload` → `ImageUploadStepTemplate`, `imageUpscaler` → `ImageUpscalerStepTemplate`, `liveTextToSpeech` → `LiveTextToSpeechStepTemplate`, `liveTranscription` → `LiveTranscriptionStepTemplate`, `mediaCaptioning` → `MediaCaptioningStepTemplate`, `mediaHash` → `MediaHashStepTemplate`, `mediaRating` → `MediaRatingStepTemplate`, `merge` → `MergeStepTemplate`, `miniMaxMusic3` → `MiniMaxMusic3StepTemplate`, `model3DPreview` → `Model3DPreviewStepTemplate`, `modelHash` → `ModelHashStepTemplate`, `modelParseMetadata` → `ModelParseMetadataStepTemplate`, `polyGen` → `PolyGenStepTemplate`, `preprocessImage` → `PreprocessImageStepTemplate`, `preprocessVideo` → `PreprocessVideoStepTemplate`, `promptEnhancement` → `PromptEnhancementStepTemplate`, `promptModeration` → `PromptModerationStepTemplate`, `qwenImageBench` → `QwenImageBenchStepTemplate`, `soniloAudioGen` → `SoniloAudioGenStepTemplate`, `textToImage` → `TextToImageStepTemplate`, `textToSpeech` → `TextToSpeechStepTemplate`, `training` → `TrainingStepTemplate`, `transcode` → `TranscodeStepTemplate`, `transcription` → `TranscriptionStepTemplate`, `videoBackgroundRemoval` → `VideoBackgroundRemovalStepTemplate`, `videoEnhancement` → `VideoEnhancementStepTemplate`, `videoFrameExtraction` → `VideoFrameExtractionStepTemplate`, `videoGen` → `VideoGenStepTemplate`, `videoInterpolation` → `VideoInterpolationStepTemplate`, `videoMetadata` → `VideoMetadataStepTemplate`, `videoUpscaler` → `VideoUpscalerStepTemplate`, `wdTagging` → `WDTaggingStepTemplate`, `webScrape` → `WebScrapeStepTemplate`, `webSearch` → `WebSearchStepTemplate`, `yuE2` → `YuE2StepTemplate`.

| Field | Type | Required | Description |
|---|---|---|---|
| `$type` | string | yes |  |
| `name` | string, nullable | no | The name of the workflow step. Used to allow steps to refer to one another. |
| `priority` | `Priority` (one of `high`, `normal`, `low`, `idle`) | no |  |
| `timeout` | string (date-span), nullable | no |  |
| `retries` | integer (int32), nullable | no |  |
| `metadata` | object, nullable | no |  |

## Responses

### 200 OK

Content type: `application/json`.

Schema `RepeatOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `steps` | array of `WorkflowStep` | yes |  |

### 400 Bad Request

Content type: `application/json`.

Schema `ProblemDetails`.

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string, nullable | no |  |
| `title` | string, nullable | no |  |
| `status` | integer (int32), nullable | no |  |
| `detail` | string, nullable | no |  |
| `instance` | string, nullable | no |  |

### 401 Unauthorized

Content type: `application/json`.

Schema `ProblemDetails` — fields as listed above.

### 403 Forbidden

Content type: `application/json`.

Schema `ProblemDetails` — fields as listed above.
