Moderations
Create chat moderation
Classify chat messages for harmful content
/v1/chat/moderationsCheck chat messages for harmful content. Unlike /v1/moderations, this endpoint accepts chat messages. Use scope to choose which messages it evaluates.
This endpoint is not compatible with the OpenAI SDK. To use that SDK, call /v1/moderations.
See Errors in the Moderation guide for status codes and what to do.
Chat messages to classify, up to 32. Only about 3 KB of the scoped conversation is classified: the first message and the latest turns. Messages in between are not checked, and the response doesn't say so.
Which messages to classify. "last" (default) processes only the last message. "all" processes every message. A positive integer N processes the last N messages. Be mindful that including many messages increases response latency.
A single aggregated moderation result for the conversation.
Show child attributes
true when ailuminate.safety is unsafe. A category can be true while flagged is false, when the content is controversial.
OpenAI-compatible category flags, derived from the AILuminate classification. sexual/minors, harassment/threatening, hate, hate/threatening, self-harm/intent and violence/graphic are currently always false.
1 or 0 for each category, mirroring categories. The classifier returns labels, not calibrated probabilities, so thresholding these scores has no effect. Returned as integers.
Additional safety classifications based on the AILuminate benchmark by MLCommons. Extends the standard OpenAI moderation categories with more granular signals.
Show child attributes
Boolean flags for AILuminate-specific safety categories.
Additional classification signals.