Skip to main content

Overview

The moderation endpoint classifies text and image content to detect potentially harmful material across multiple categories. Learn more in the moderation guide.

Method

Parameters

string | array
required
Input to classify. Can be:
  • A single string
  • An array of strings
  • An array of multi-modal input objects (text and images)
string
The content moderation model to use. Available models:
  • omni-moderation-latest - Latest omni-modal model
  • omni-moderation-2024-09-26 - Specific omni-modal version
  • text-moderation-latest - Latest text-only model
  • text-moderation-stable - Stable text-only model
Learn more in the moderation guide and about available models.

Response

Returns a ModerationCreateResponse object containing:
string
Unique identifier for the moderation request
string
The model used to generate the moderation results
array
List of moderation objects, one for each input

Examples

Text Moderation

Multi-Modal Moderation

Batch Moderation

Async Usage