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 modelomni-moderation-2024-09-26- Specific omni-modal versiontext-moderation-latest- Latest text-only modeltext-moderation-stable- Stable text-only model
Response
Returns aModerationCreateResponse 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