> ## Documentation Index
> Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Content Moderation API: Review Text, Images, and Video

> Check text, an image, and videos in one asynchronous moderation task and get a verdict and risk labels for each item.

Use Content Moderation to review text, a single image, and up to three videos in one task. Video moderation covers visual content. The response identifies which items were flagged so you can decide how to handle them.

## Endpoints

Base URL: `https://api.apixo.ai/api/v1`

| Method | Endpoint | Purpose |
| - | - | - |
| `POST` | `/generateTask/content-moderation` | Submit items for review |
| `GET` | `/statusTask/content-moderation?taskId={taskId}` | Read the task status and verdicts |

## Authentication

Send `Authorization: Bearer YOUR_API_KEY`. For POST requests, also send `Content-Type: application/json`. Poll with an API key belonging to the account that submitted the task.

## Request body

```json theme={null}
{
  "request_type": "async",
  "input": {
    "prompt": "A quiet afternoon at the park.",
    "image_urls": ["https://example.com/park.jpg"],
    "video_urls": ["https://example.com/scene.mp4"]
  }
}
```

Replace the example URLs with publicly reachable files. You can submit any combination of the three fields. At least one text, image, or video item is required.

## Parameters

**request\_type** `string` (default: async)

Supported values: `async`, `callback`. Use async to poll for the result or callback to receive the terminal result at your receiver.

**callback\_url** `string`

Public HTTPS receiver. Required when `request_type` is `callback`. See [Webhooks](https://apixo.ai/docs/api-reference/webhooks.md).

**input** `object` *required*

Provide at least one nonblank prompt, image URL, or video URL. Media URLs must remain accessible until the task finishes.

**properties**

**prompt** `string`

Optional nonblank text of up to 4,000 characters.

**image\_urls** `array`

Optional array containing at most one public HTTPS image URL.

**video\_urls** `array`

Optional ordered array of up to three public HTTPS video URLs. Use MP4, MOV, or M4V. Each video may be up to 60 seconds.

## Responses

The POST response acknowledges the request and returns its task ID.

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": { "taskId": "example-task-id" }
}
```

Save the ID and poll the status endpoint, or receive the terminal result through your webhook. A task can be `processing`, `success`, or `failed`. A successful HTTP response can contain a failed task, so check `data.state`.

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "example-task-id",
    "state": "success",
    "createTime": 1794291237357,
    "completeTime": 1794291245073,
    "costTime": 7716,
    "resultJson": "{\"flagged\":false,\"prompt\":{\"flagged\":false,\"labels\":[]},\"images\":[{\"flagged\":false,\"labels\":[]}],\"videos\":[{\"flagged\":false,\"labels\":[]}]}"
  }
}
```

Parse `data.resultJson` once as JSON. The `prompt` property appears when you supply text. `images` and `videos` preserve input order and are empty when you omit their inputs.

| `flagged` | Item | Overall result |
| - | - | - |
| `true` | One or more risk labels were returned | At least one item was flagged |
| `false` | The review completed with no flags | All items completed with no flags |
| `null` | The item could not be reviewed | At least one review failed and no completed item was flagged |

A failed item has a `failCode` such as `INVALID_VIDEO` or `MODERATION_UNAVAILABLE` in place of `labels`. A partial result uses `state: "success"` when at least one item completed. If every item fails, the task returns `state: "failed"`, `failCode`, and `failMsg` in place of `resultJson`.

## Polling

| Use case | Recommended first poll | Poll interval |
| - | - | - |
| Moderation | About 5 seconds after acceptance | 5 seconds or longer |

Use callback mode if you want a terminal notification. After a status timeout, check the same task ID before submitting again.

## Billing

| Item | Standard price (USD) |
| - | -: |
| Text prompt | \$0.001 per prompt |
| Image | \$0.001 per image |
| Video | \$0.003 per video |

A request with one prompt, one image, and one video totals \$0.005 at standard prices. Completed items are billable whether flagged or clear. Failed items are refunded. Account pricing and platform rounding may affect the final charge. See [API pricing](https://apixo.ai/docs/pricing.md#utility-apis).

## MCP integration

Use the HTTP endpoints for the structured moderation verdict. The current MCP result formats cover media and text outputs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.