---
url: /orchestration/reference/operations/InvokeTranscodeStepTemplate.md
description: 'POST /v2/consumer/recipes/transcode — Transcoding'
---

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

# Transcoding

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

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

| Field | Type | Required | Description |
|---|---|---|---|
| `sourceUrl` | string (uri) | yes |  |
| `containerFormat` | `ContainerFormat` (one of `mp4`, `webM`) | no | (default `"mp4"`) |
| `width` | integer (int32) | yes |  |
| `destinationUrl` | string (uri), nullable | no |  |
| `public` | boolean, nullable | no | Serves the result at a stable unsigned url. Privileged callers only: nothing gates a read of it, so a block decided after the fact cannot take it back. |
| `hideMetadata` | boolean, nullable | no | Removes the source's container tags and chapters; the video and audio streams are untouched. |
| `maxDuration` | number (double), nullable | no | Cuts the output after this many seconds. (minimum `0.1`, maximum `86400`) |
| `watermark` | `Watermark` | no | An image repeated across the whole output, burned into every frame. |

### Types used by the request body

#### Watermark

Schema `Watermark` — An image repeated across the whole output, burned into every frame.

| Field | Type | Required | Description |
|---|---|---|---|
| `image` | string (source-image) | yes | The tile, typically a PNG with transparency. It is imported and moderated like any other input image. |
| `opacity` | number (float) | no | (default `0.3`, minimum `0`, maximum `1`) |
| `scale` | number (float) | no | Width of one tile as a fraction of the output width. (default `0.25`, minimum `0.01`, maximum `1`) |
| `angle` | number (float) | no | Counter-clockwise rotation of the tiled pattern, in degrees. (default `0`, minimum `-90`, maximum `90`) |

## Responses

### 200 OK

Content type: `application/json`.

Schema `TranscodeOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Gets the id of the blob that contains the media. |
| `available` | boolean | yes |  |
| `url` | string (uri), nullable | no |  |
| `urlExpiresAt` | string (date-time), nullable | no |  |
| `jobId` | string | yes |  |
| `tier` | string, nullable | no | Deprecated: use `publicUrl` to tell a public blob. Storage tier holding the blob; null when none was declared. |
| `publicUrl` | string (uri), nullable | no | The durable, unsigned url of a blob requested public, which a CDN can cache. May 404 until the workflow that produces it completes; `url` waits instead. |

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