Moderation
Classify supported content and apply your application’s handling policy.
Before You Begin
Moderation returns model classifications for submitted content. Your application decides how to use them, such as allowing content, requesting review, or rejecting it.
Complete the quickstart. You need an enabled moderation model and the opt-in moderation.write scope. The reviewed moderation profiles do not debit workspace credits; rate and concurrency limits still apply.
Classify Content
Select an exact supported model and submit text. The OpenAI profile also supports one inline image, optionally with one text part. Supported input shapes and limits are defined in the Moderation reference.
curl --fail --show-error --request POST \
--url "$AUDIOLAB_API_URL/v1/moderations" \
--header "Authorization: Bearer $AUDIOLAB_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "openai/omni-moderation-2024-09-26",
"input": "VALUE"
}'Do not add an Idempotency-Key header or request streaming; this endpoint does not support them.
Interpret the Response
Read the categories and scores returned by the selected model. OpenAI includes a flagged field; Mistral uses its own categories and does not synthesize that field. Do not assume the category names or thresholds are interchangeable.
A flagged classification is a successful API response. A provider error is a failure to classify, not evidence that the content is safe. Handle these outcomes separately and evaluate your policy with representative inputs.
Inputs and classifications are not persisted by this endpoint. Request metadata appears in Logs; retain any classification your application needs according to your own data policy.