---
url: /orchestration/reference/operations/InvokeConvertImageStepTemplate.md
description: 'POST /v2/consumer/recipes/convertImage — A workflow step that converts images to different formats and applies optional transforms'
---

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

# A workflow step that converts images to different formats and applies optional transforms

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

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

| Field | Type | Required | Description |
|---|---|---|---|
| `image` | string (source-image) | yes | Either A URL, A DataURL or a Base64 string |
| `transforms` | array of `ImageTransform` | no | Applied in order, before conversion. |
| `output` | `ImageOutputFormat` | yes |  |
| `public` | boolean, nullable | no | Stores the result in a bucket that serves it directly, so the URL is stable and unsigned (CDN-cacheable). Privileged callers only: nothing gates a read, so no NSFW level, blocked reason or mature-content restriction applies and a later block cannot take it back. |

### Types used by the request body

#### ImageTransform

Schema `ImageTransform`.

Polymorphic: the `type` field selects the concrete type — `resize` → `ResizeTransform`, `blur` → `BlurTransform`, `watermark` → `WatermarkTransform`.

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

#### ImageOutputFormat

Schema `ImageOutputFormat`.

Polymorphic: the `format` field selects the concrete type — `jpeg` → `JpegOutputFormat`, `png` → `PngOutputFormat`, `webp` → `WebpOutputFormat`, `gif` → `GifOutputFormat`, `avif` → `AvifOutputFormat`.

| Field | Type | Required | Description |
|---|---|---|---|
| `format` | string | yes |  |
| `hideMetadata` | boolean | yes | Strips metadata such as EXIF from the output. Defaults to false; some encoders (e.g. JPEG) may still emit minimal metadata. |

## Responses

### 200 OK

Content type: `application/json`.

Schema `ConvertImageOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `blob` | `ImageBlob` | no |  |

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