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

# Omni Moderation

> The Omni Moderation API checks text and one HTTPS image against OpenAI's safety categories and returns flags, scores and input types per category.

> [!TIP]
>
> 1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
> 2. Regardless of whether `callback_url` is provided, you can retrieve the result through the unified [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) endpoint.

Omni Moderation runs OpenAI's multimodal moderation model `omni-moderation-latest` on text, an image, or both, and returns whether the input is flagged together with per-category scores. Use it to screen user prompts and uploads before sending them to generation models.

The endpoint uses the same task flow as the generation models: submit to `/api/generate/submit`, then read the verdict from the `output` field of [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) or the callback payload.

## Models

* **openai/omni-moderation-latest** — Text and image moderation with OpenAI's Omni Moderation model.

## Features

* Classify text, one image, or both in one request.
* 13 categories, each with a boolean flag and a score between 0 and 1.
* `category_applied_input_types` shows whether each category was evaluated on text, image or both.
* Works with `callback_url` like every Vidgo task.

## Input modes

* **Text**: send `prompt`.
* **Image**: send one HTTPS URL in `image_urls`.
* **Text and image**: send both; categories that support images evaluate both inputs.

## Required parameters

* At least one of `prompt` or `image_urls`.

## Optional parameters

* `prompt` (string): Text to classify.
* `image_urls` (string\[]): At most one public HTTPS image URL.

## Output

The finished task has an empty `files` array and the complete moderation result in `output`:

```json theme={"dark"}
{
  "id": "modr-4603",
  "model": "omni-moderation-latest",
  "results": [
    {
      "categories": {
        "harassment": false,
        "harassment/threatening": false,
        "hate": false,
        "hate/threatening": false,
        "illicit": false,
        "illicit/violent": false,
        "self-harm": false,
        "self-harm/instructions": false,
        "self-harm/intent": false,
        "sexual": false,
        "sexual/minors": false,
        "violence": false,
        "violence/graphic": false
      },
      "category_applied_input_types": {
        "harassment": [
          "text"
        ],
        "harassment/threatening": [
          "text"
        ],
        "hate": [
          "text"
        ],
        "hate/threatening": [
          "text"
        ],
        "illicit": [
          "text"
        ],
        "illicit/violent": [
          "text"
        ],
        "self-harm": [
          "text"
        ],
        "self-harm/instructions": [
          "text"
        ],
        "self-harm/intent": [
          "text"
        ],
        "sexual": [
          "text"
        ],
        "sexual/minors": [
          "text"
        ],
        "violence": [
          "text"
        ],
        "violence/graphic": [
          "text"
        ]
      },
      "category_scores": {
        "harassment": 1.5206840370677115e-06,
        "harassment/threatening": 1.816222403812674e-07,
        "hate": 1.0953122821495382e-06,
        "hate/threatening": 8.851569304133282e-08,
        "illicit": 8.530321297909616e-07,
        "illicit/violent": 5.77192003016332e-07,
        "self-harm": 4.53978687024344e-06,
        "self-harm/instructions": 1.628051547091001e-07,
        "self-harm/intent": 1.7231572752142392e-06,
        "sexual": 3.3931448129766124e-07,
        "sexual/minors": 8.059446204294678e-08,
        "violence": 9.028039015031105e-06,
        "violence/graphic": 3.535625074174432e-06
      },
      "flagged": false
    }
  ]
}
```

* `results[0].flagged` (boolean): `true` when the input is flagged in any category.
* `results[0].categories` (object): One boolean per category.
* `results[0].category_scores` (object): One score per category, from 0 to 1; higher means more likely.
* `results[0].category_applied_input_types` (object): The input types (`text`, `image`) evaluated for each category.

Categories: `harassment`, `harassment/threatening`, `hate`, `hate/threatening`, `illicit`, `illicit/violent`, `self-harm`, `self-harm/instructions`, `self-harm/intent`, `sexual`, `sexual/minors`, `violence`, `violence/graphic`.

## Examples

* **Text and image**: a scene description plus the matching railway waiting-room image; `flagged: false`.
* **Text only**: a short story about a lighthouse keeper and a puffin; `flagged: false`.

## Notes

* `image_urls` takes one HTTPS URL; data URIs, Base64 strings and other schemes return 400.
* `input` accepts `prompt` and `image_urls`; other fields return 400. Put `model` and `callback_url` at the request root.
* See the [pricing page](https://vidgo.ai/apis/api-pricing) for current rates.


## OpenAPI

````yaml api-manual/tools-series/openai-omni-moderation-latest.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Omni Moderation
  description: >-
    The Omni Moderation API checks text and one HTTPS image against OpenAI's
    safety categories and returns flags, scores and input types per category.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Omni Moderation
      summary: Submit Omni Moderation Task
      operationId: submitOmniModerationTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-and-image:
                summary: Text and image
                value:
                  model: openai/omni-moderation-latest
                  input:
                    prompt: >-
                      An elderly grandfather and his granddaughter sit in a
                      quiet rural railway waiting room on a rainy autumn night
                      while a station attendant offers tea.
                    image_urls:
                      - >-
                        https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png
              text-only:
                summary: Text only
                value:
                  model: openai/omni-moderation-latest
                  input:
                    prompt: >-
                      At dusk on a windswept Icelandic cliff, an elderly
                      lighthouse keeper lights a brass lantern while a small
                      Atlantic puffin watches the rolling waves below.
      responses:
        '200':
          description: >-
            Task submission result. A task ID identifies asynchronous work;
            generation may still be running.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: openai/omni-moderation-latest
        callback_url:
          type: string
          format: uri
          description: Optional webhook URL for completion or failure notifications.
          example: https://your-domain.com/callback
        input:
          type: object
          additionalProperties: false
          properties:
            prompt:
              type: string
              description: Text to classify. Provide `prompt`, `image_urls` or both.
            image_urls:
              type: array
              maxItems: 1
              items:
                type: string
                format: uri
                description: Use a publicly accessible HTTPS image URL.
              description: At most one image to classify, as a public HTTPS URL.
          description: Provide `prompt`, `image_urls` or both.
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: 3K8RB0DB7SGSLQJG
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-25T11:13:01'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error message. See [Error Codes](/api-manual/error-codes).
          example: prompt or image_urls is required
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use `Authorization: Bearer VIDGO_API_KEY`.'

````

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