---
url: /orchestration/reference/operations/InvokeTextToImageStepTemplate.md
description: 'POST /v2/consumer/recipes/textToImage — TextToImage'
---

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

# TextToImage

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

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

Generate images using text as input

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

| Field | Type | Required | Description |
|---|---|---|---|
| `quantity` | integer (int32) | no | The number of batches to run. (default `1`, minimum `1`, maximum `100`) |
| `batchSize` | integer (int32) | no | (default `1`, minimum `1`, maximum `100`) |
| `model` | string | no | (default `"urn:air:sd1:checkpoint:civitai:4384@128713"`, 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_\-]+))?$`) |
| `additionalNetworks` | map of `ImageJobNetworkParams` | no | Additional networks keyed by their AIR. |
| `controlNets` | array of `ImageJobControlNet` | no |  |
| `prompt` | string | yes |  |
| `negativePrompt` | string, nullable | no |  |
| `scheduler` | `Scheduler` (one of `eulerA`, `euler`, `lms`, `heun`, `dpM2`, `dpM2A`, `dpM2SA`, `dpM2M`, `dpmsde`, `dpmFast`, `dpmAdaptive`, `lmsKarras`, `dpM2Karras`, `dpM2AKarras`, `dpM2SAKarras`, `dpM2MKarras`, `dpmsdeKarras`, `ddim`, `plms`, `uniPC`, `undefined`, `lcm`, `ddpm`, `deis`, `dpM3MSDE`) | no | (default `"eulerA"`) |
| `steps` | integer (int32) | no | (default `30`, minimum `1`, maximum `150`) |
| `cfgScale` | number (double) | yes | (default `7.5`, minimum `1`, maximum `30`) |
| `width` | integer (int32) | no | (default `512`, minimum `64`, maximum `4084`) |
| `height` | integer (int32) | no | (default `512`, minimum `64`, maximum `4084`) |
| `seed` | integer (int64) | yes | The seed to use in image generation. Defaults to a random value if left unpopulated. (minimum `0`, maximum `4294967295`) |
| `clipSkip` | integer (int32) | no | (default `2`) |
| `imageMetadata` | string, nullable | no | External metadata that will be stored with the image |
| `engine` | string, nullable | no |  |
| `outputFormat` | `OutputFormat` (one of `png`, `jpeg`, `webP`) | no | The format in which to output images, Png and WebP may charge an additional cost. (default `"jpeg"`) |
| `sourceImage` | string (source-image), nullable | no | An optional source image to trigger img-to-img |
| `sourceImageDenoiseStrenght` | number (double) | no | The strength/denoise factor for img2img (0.0-1.0). Lower values preserve more of the source image. (default `0.8`) |

### Types used by the request body

#### ImageJobNetworkParams

Schema `ImageJobNetworkParams`.

| Field | Type | Required | Description |
|---|---|---|---|
| `strength` | number (double), nullable | no | In case of Lora and LoCon, set the strength of the network |
| `triggerWord` | string, nullable | no | In case of a TextualInversion, set the trigger word of the network |
| `type` | string, nullable | no | A legacy type set by the consumer |

#### ImageJobControlNet

Schema `ImageJobControlNet`.

| Field | Type | Required | Description |
|---|---|---|---|
| `preprocessor` | `ImageTransformer` (one of `canny`, `mlsd`, `depthZoe`, `depthAnything`, `depthAnythingV2`, `zoeDepthAnything`, `zoeDepth`, `midasDepth`, `leresDepth`, `metric3dDepth`, `softedgePidinet`, `hed`, `teed`, `midasNormal`, `baeNormal`, `dsineNormal`, `metric3dNormal`, `lineartRealistic`, `lineartStandard`, `lineartAnime`, `lineartManga`, `anyline`, `scribble`, `scribbleXdog`, `scribblePidinet`, `fakeScribble`, `openpose`, `dwpose`, `oneformerCoco`, `oneformerAde20k`, `uniformer`, `shuffle`, `tile`, `gray`, `rembg`, `inpaint`) | yes |  |
| `weight` | number (double) | yes |  |
| `startStep` | number (double) | yes |  |
| `endStep` | number (double) | yes |  |
| `image` | string (source-image), nullable | no | The preprocessed control image. Accepts an AIR URN, a URL, or a base64 data URL; the orchestrator processes it into a stored blob before the job is dispatched. |
| `mask` | string (source-image), nullable | no | The inpaint mask image. Required when the preprocessor is Inpaint. |

## Responses

### 200 OK

Content type: `application/json`.

Schema `TextToImageOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `images` | array of `ImageBlob` | 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.
