OpenAI’s Moderation API classifies text and images for potentially harmful content and returns category-level signals your application can use to allow, block, review, or escalate content. It does not enforce your policy, guarantee that content is safe, or replace other safeguards: your application must inspect the results and decide what happens next.
Choose where moderation fits in your workflow
There are two useful integration paths. Choose based on what you need to screen, then make sure your application acts on the result before content reaches a user.
As an Amazon Associate I earn from qualifying purchases.
| Path | Best suited to | Where results appear | What your application must do |
|---|---|---|---|
Standalone POST /moderations |
Screening user input or other text and image content independently of a generation request. | In the moderation response, which includes the model identifier and one or more result objects. | Read the results and apply your own policy before accepting, displaying, or routing the content. |
| Moderation alongside generation | Workflows that need moderation signals for model inputs and generated outputs. | Alongside input and output information in Responses API or Chat Completions requests. | Do not assume generation is blocked. Inspect the moderation result before displaying output or taking a downstream action. |
For streaming generation, moderation scores are available once the full generated output is available, not with partial output deltas. If you need to screen before display, do not release partial generated text while waiting for that complete result.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Understand the response before setting policy
The API reference lists omni-moderation-latest as the default model for the /moderations endpoint. Requests can contain one string, an array of strings, or multimodal input objects containing text and/or image content. The response has several fields with different purposes:
#1 Best Overall
flaggedindicates whether any category was flagged. OpenAI recommends it as a first-pass signal.categoriescontains a Boolean flag for each category, helping you route content according to a more specific policy.category_scorescontains values from 0 to 1. Higher values indicate greater model confidence that content belongs to that category; they are signals, not universal probabilities or ready-made policy thresholds.category_applied_input_typesindicates which input modalities each category score applies to. Use it to avoid treating an unsupported category score as evidence that a modality was checked.
Scores can change when OpenAI updates the model, so a custom policy based on scores may need recalibration. The documentation does not establish one universally appropriate threshold. Choose routing rules against your product’s risks and review representative outcomes rather than treating a particular score as a general definition of safe or unsafe.
Check category coverage by modality
The documented categories include harassment, threatening harassment, hate, threatening hate, illicit activity, violent illicit activity, self-harm, self-harm intent and instructions, sexual content, sexual content involving minors, violence, and graphic violence. Support varies by category and input type:
Rank #2
omni-moderation-latestaccepts text and images, but does not classify audio.- Some categories are text-only. An image-only request can return a zero score for a category that does not support images; that zero does not mean the image was checked for that category.
- The Moderation guide documents a maximum image file size of 20 MB.
Check the live OpenAI Moderation guide and Moderation API reference before relying on category support, limits, or response behavior; these implementation details can change.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesBuild an application policy around the signals
Decide what your product should do with content before wiring scores into user-facing behavior. A practical policy distinguishes among content that can proceed, content that should be blocked, and content that needs human review or escalation. Then map moderation signals to those outcomes according to the category and the consequences of a mistaken decision.
Rank #3
- Use
flaggedfor an initial check, and inspect category flags when a category-specific decision matters. - Use scores to inform your own policy, not as a universal probability or an automatic threshold supplied by OpenAI.
- Define what happens when moderation fails or returns no usable result. Choose fail-safe behavior that fits the risk of the particular action; do not silently treat an unavailable result as approval.
- When content is ambiguous or a decision has significant consequences, provide reviewers with enough context and a clear escalation path.
Moderation covers conversation content, not every element surrounding it: the guide says tool names, descriptions, schemas, and response-format schemas are not covered as conversation content. Where tool-call arguments or tool outputs appear as conversation content, inspect them as part of your safety workflow rather than assuming the surrounding tool definition was moderated.
Test beyond ordinary examples
Include representative product traffic and adversarial cases in testing, including prompt-injection attempts that try to redirect a model or evade your safeguards. Measure how your policy routes those cases, and revisit rules when model behavior or your product changes.
OpenAI’s Safety best practices recommends red-teaming, prompt engineering, and suitable limits on user inputs and generated outputs alongside moderation. It also says, “Wherever possible, we recommend having a human review outputs before they are used in practice.” Human review is particularly important in high-stakes domains; moderation results alone are not a substitute for a responsible review process.
Keep the child-safety boundary explicit
OpenAI’s Moderation guide says the API is “not designed for CSAM detection or handling and is not a substitute for dedicated child-safety safeguards.” Do not send known or suspected child sexual abuse material (CSAM) to the Moderation API. Design separate child-safety safeguards and an appropriate incident-response path for that risk.
Account for API data controls
OpenAI’s API data controls documentation says default abuse-monitoring logs may contain customer content, including prompts and responses, as well as derived metadata such as classifier outputs. By default, logs are retained for up to 30 days unless a longer period is legally required. Eligible customers may apply for Modified Abuse Monitoring or Zero Data Retention; both require prior approval and acceptance of additional requirements. Check current eligibility and endpoint-specific behavior before relying on either control. Zero Data Retention is not a default setting for every API account.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




