Moderations
moderations
Methods
Create Moderation -> { id, model, results }
post/moderations
Classifies if text and/or image inputs are potentially harmful. Learn more in the moderation guide.
Security
Bearer Auth
Example: Authorization: Bearer My API Key
Body parameters
Input (or inputs) to classify. Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.
The content moderation model you would like to use. Learn more in the moderation guide, and learn about available models here.
Response fields
id: string
The unique identifier for the moderation request.
model: string
The model used to generate the moderation results.
A list of moderation objects.
Request example
200Example
Domain types
Moderation = { categories, category_applied_input_types, category_scores, 1 more... }
ModerationImageURLInput = { image_url, type }
ModerationModel = "omni-moderation-latest" | "omni-moderation-2024-09-26" | "text-moderation-latest" | 1 more...
ModerationTextInput = { text, type }