---
url: /orchestration/reference/operations/InvokeImageResourceTrainingStepTemplate.md
description: 'POST /v2/consumer/recipes/imageResourceTraining — LORA Training'
---

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

# LORA Training

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

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

Train LORA's

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

Polymorphic: the `engine` field selects the concrete type — `kohya` → `KohyaImageResourceTrainingInput`, `flux-dev-fast` → `FluxDevFastImageResourceTrainingInput`, `musubi` → `MusubiImageResourceTrainingInput`, `flux2-dev` → `Flux2DevImageResourceTrainingInput`, `flux2-dev-edit` → `Flux2DevEditImageResourceTrainingInput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `engine` | string | yes |  |
| `model` | string | yes | (pattern `^(?:urn:)?(?:air:)?(?:(?<ecosystem>[a-zA-Z0-9_\-\/]+):)?(?:(?<type>[a-zA-Z0-9_\-\/]+):)?(?<source>[a-zA-Z0-9_\-\/]+):(?<id>[a-zA-Z0-9_\-\/\.]+)(?:@(?<version>[a-zA-Z0-9_\-\/.=,%+:]+))?(?:\.(?<format>[a-zA-Z0-9_\-]+))?$`) |
| `trainingData` | string (uri) | yes |  |
| `trainingDataImagesCount` | integer (int32) | yes | The number of images embedded in this training data. This is used to calculate the cost of training. |
| `loraName` | string | no | (default `"my-lora"`) |
| `samplePrompts` | array of string | no |  |
| `negativePrompt` | string, nullable | no | An optional negative prompt that will get applied when generating samples |

## Responses

### 200 OK

Content type: `application/json`.

Schema `ImageResourceTrainingOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `moderationStatus` | `ImageResouceTrainingModerationStatus` (one of `evaluating`, `underReview`, `approved`, `rejected`) | yes | The status of age classification |
| `epochs` | array of `EpochResult` | yes |  |
| `sampleImagesPrompts` | array of string | yes |  |
| `sampleInputImages` | array of string (uri), nullable | no |  |
| `storedAsAssets` | boolean, nullable | no | True when the blobs are stored as (deprecated) assets, which need a different retrieval mechanism. |
| `eta` | number (double), nullable | no | Get an estimate in minutes on how long the work is expected to take |

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