---
url: /orchestration/reference/operations/InvokeTrainingStepTemplate.md
description: 'POST /v2/consumer/recipes/training — Training'
---

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

# Training

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

Operation `InvokeTrainingStepTemplate` · 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`.

Trains models (LoRAs, checkpoints) on images, videos or audio, one job per epoch.

## 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 `TrainingInput`.

Polymorphic: the `engine` field selects the concrete type — `ai-toolkit` → `AIToolkitTrainingInput`, `comfy` → `ComfyTrainingInput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `engine` | string | yes |  |
| `trainingData` | `TrainingData` | yes |  |
| `samples` | `TrainingInputSamples` | no | Sample generation configuration for preview outputs during training |
| `usesStepPricing` | boolean | yes | Whether this run uses step-based pricing rather than the legacy flat per-epoch price. |

### Types used by the request body

#### TrainingData

Schema `TrainingData`.

Polymorphic: the `type` field selects the concrete type — `zip` → `ZipTrainingData`, `blobs` → `BlobsTrainingData`.

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string | yes |  |

#### TrainingInputSamples

Schema `TrainingInputSamples`.

| Field | Type | Required | Description |
|---|---|---|---|
| `prompts` | array of string | no | A selection of sample prompts to generate preview outputs during training. |
| `negativePrompt` | string, nullable | no |  |
| `sourceImages` | array of string (source-image) | no | Source images for edit-LoRA sample generation, passed as reference images when rendering samples. |
| `cfgScale` | number (double), nullable | no | CFG (guidance) scale for sample generation. When unset, each ecosystem uses its own default. |
| `strength` | number (double), nullable | no | Strength of the trained LoRA when generating samples. Defaults to 1.0 when unset. |

## Responses

### 200 OK

Content type: `application/json`.

Schema `TrainingOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `moderationStatus` | `TrainingModerationStatus` (one of `evaluating`, `underReview`, `approved`, `rejected`) | yes |  |
| `epochs` | array of `TrainingOutputEpochResult` | yes | Every epoch of the run in epoch order, from the start of the step. Epochs that are still pending or training carry a model with `available: false` and no samples yet. |

### 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.
