---
url: /orchestration/reference/operations/InvokeMediaRatingStepTemplate.md
description: 'POST /v2/consumer/recipes/mediaRating — MediaRating'
---

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

# MediaRating

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

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

Performs NSFW level detection and content safety classification on media content.

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

| Field | Type | Required | Description |
|---|---|---|---|
| `image` | string (source-image), nullable | no | The image to rate. URLs are imported into blob storage before the job is queued so the worker can pre-fetch it. |
| `includeAgeClassification` | boolean | yes | Include conditional age-classification details for R-or-higher content in the results. The top-level CSAM signal is evaluated regardless of this setting. |
| `includeFaceRecognition` | boolean | yes | Include face recognition and similarity analysis in the results |
| `includeAIRecognition` | boolean | yes | Include AI vs real image detection in the results |
| `includeAnimeRecognition` | boolean | yes | Include anime vs real image detection in the results |
| `includeHumanRecognition` | boolean | yes | Include human vs non-human detection in the results |
| `includeBodyAgeClassification` | boolean | yes | Include body-only apparent-age and child-risk classification in the results. |
| `includeAnimeBodyAgeClassification` | boolean | yes | Include anime apparent-age and child-risk classification in the results. |
| `includeJointAgeClassification` | boolean | yes | Include joint face-and-body apparent-age classification for photo and anime content. |

## Responses

### 200 OK

Content type: `application/json`.

Schema `MediaRatingOutput`.

| Field | Type | Required | Description |
|---|---|---|---|
| `nsfwLevel` | `NSFWLevel` (one of `pg`, `pg13`, `r`, `x`, `xxx`, `na`) | yes |  |
| `blockedReason` | string, nullable | no |  |
| `isBlocked` | boolean | yes |  |
| `labels` | array of string, nullable | no | Detected content labels (e.g., "Animal", "Child", etc.). |
| `ageClassification` | `AgeClassificationResult` | no |  |
| `faceRecognition` | `FaceRecognitionResult` | no |  |
| `aiRecognition` | `AIRecognitionResult` | no | Represents AI vs real image recognition results. |
| `animeRecognition` | `AnimeRecognitionResult` | no | Represents anime vs real image recognition results. |
| `csam` | boolean, nullable | no | Potential CSAM signal from conditional age classification on R-or-higher content. Null means the image was below R or age classification failed. |
| `humanRecognition` | `HumanRecognitionResult` | no | Represents human vs non-human image recognition results. |
| `bodyAgeClassification` | `BodyAgeClassificationResult` | no | Body-only apparent-age and child-risk results (if requested). |
| `animeBodyAgeClassification` | `AnimeBodyAgeClassificationResult` | no | Anime apparent-age and child-risk results (if requested). |
| `jointAgeClassification` | `JointAgeClassificationResult` | no | Joint face-and-body apparent-age results for photo and anime content (if requested). |

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