---
url: /orchestration/reference/operations/InvokeMediaCaptioningStepTemplate.md
description: 'POST /v2/consumer/recipes/mediaCaptioning — Media Captioning'
---

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

# Media Captioning

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

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

Generates a descriptive caption for a single media item using the JoyCaption model.

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

| Field | Type | Required | Description |
|---|---|---|---|
| `model` | string, one of `joy-caption`, `ideogram4` | no | Captioning model and output contract. Use `ideogram4` for structured Ideogram 4 JSON captions with normalized bounding boxes. (default `"joy-caption"`) |
| `mediaUrl` | string (uri) | yes | The URL of the media to caption (single image or video). |
| `temperature` | number (double) | no | Sampling temperature for caption generation. Ideogram 4 uses the Qwen model's fixed sampling defaults to match AI Toolkit. (default `0.5`) |
| `maxNewTokens` | integer (int32) | no | Maximum number of tokens to generate. Ideogram 4 enforces a 3072-token floor. (default `300`) |
| `customInstructions` | string, nullable | no | Optional extra instructions appended to the captioning prompt to steer tone, structure, or formatting. Leave unset for the default caption. |

## Responses

### 200 OK

Content type: `application/json`.

Schema `MediaCaptioningOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `caption` | string | 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.
