Skip to main content
POST
  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 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 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:
  • 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 for current rates.

Authorizations

Authorization
string
header
required

Use Authorization: Bearer VIDGO_API_KEY.

Body

application/json
model
string
required
Example:

"openai/omni-moderation-latest"

input
object
required

Provide prompt, image_urls or both.

callback_url
string<uri>

Optional webhook URL for completion or failure notifications.

Example:

"https://your-domain.com/callback"

Response

Task submission result. A task ID identifies asynchronous work; generation may still be running.

code
integer
required
Example:

200

data
object
required