/moderationsCreate a moderation classification
Classifies text and image inputs for potentially harmful content. Supply input as a string, an array of strings, or supported multimodal input; model defaults to omni-moderation-latest. Use the returned results to review moderation flags, categories, and category scores.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Content to classify and, optionally, the moderation model to use.
One documented failure
slow_downYour request rate increased too quickly. Please reduce the request rate and gradually increase it again.
Traffic increased too quickly
One documented failure
server_is_overloadedThe model is temporarily overloaded. Please retry your request after a brief delay.
The requested model is temporarily overloaded
A 400 is returned when input is invalid or request parameters are unsupported. A 403 is returned when access to the requested moderation model is denied. A 429 is returned when the request rate limit is exceeded; for a slow_down error, reduce your request rate and increase it gradually. A 500 is returned when an internal error prevents processing, and a 503 is returned when the service or requested model is temporarily unavailable. input is required, and model must be one of omni-moderation-latest, omni-moderation-2024-09-26, text-moderation-latest, or text-moderation-stable when specified.