Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Moderations

Given text and/or image inputs, classifies if those inputs are potentially harmful.

Create moderation
$ openai moderations create
POST/moderations
ModelsExpand Collapse
moderation: object { categories, category_applied_input_types, category_scores, flagged }
moderation_image_url_input: object { image_url, type }

An object describing an image to classify.

moderation_model: "omni-moderation-latest" or "omni-moderation-2024-09-26" or "text-moderation-latest" or "text-moderation-stable"
moderation_multi_modal_input: ModerationImageURLInput { image_url, type } or ModerationTextInput { text, type }

An object describing an image to classify.

moderation_text_input: object { text, type }

An object describing text to classify.