Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Moderation | OpenAI API

Explains how to implement the Moderation API to check content for violations of safety policies such as hate speech, self-harm, and sexual content.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Moderation | OpenAI API

Explains how to implement the Moderation API to check content for violations of safety policies such as hate speech, self-harm, and sexual content.

When To Use

Use when you need to programmatically detect and filter unsafe or policy-violating text input or output in an AI-powered application.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/moderation-openai-api-workflow-guide.mdA guide explaining how to use the OpenAI moderation endpoint to identify and take action on potentially harmful text or image content.Questions about a guide explaining how to use the OpenAI moderation endpoint to identify and take action on potentially harmful text...
examples/moderation-openai-api-openai-moderation-api-python-client.textA Python code snippet demonstrating how to use the OpenAI client to create a moderation request using the omni-moderation-latest model.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to use the OpenAI client to create a moderation request using the omni-modera...
examples/moderation-openai-api-openai-moderation-api-nodejs-quickstart.textA JavaScript code snippet demonstrating how to use the OpenAI Node.js SDK to create a moderation request using the omni-moderation-latest model.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to use the OpenAI Node.js SDK to create a moderation request using the om...
examples/moderation-openai-api-openai-moderation-api-curl-request.textA curl command demonstrating how to send a POST request to the OpenAI Moderation API using the omni-moderation-latest model.Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a POST request to the OpenAI Moderation API using the omni-moderation-latest...
examples/moderation-openai-api-openai-moderation-python-client.textA Python code snippet demonstrating how to use the OpenAI client to create a moderation request with text and image inputs.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to use the OpenAI client to create a moderation request with text and image i...
examples/moderation-openai-api-openai-moderation-api-nodejs-omni-moderation-lates.textA Node.js code example demonstrating how to use the omni-moderation-latest model to classify text and image inputs via the OpenAI Moderation API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the omni-moderation-latest model to classify text and image inputs vi...
examples/moderation-openai-api-openai-moderation-api-curl-request-2.textA curl command demonstrating how to send a POST request to the OpenAI Moderation API using the omni-moderation-latest model with text and image inputs.Exact payloads, commands, or snippets shown in A curl command demonstrating how to send a POST request to the OpenAI Moderation API using the omni-moderation-latest...
examples/moderation-openai-api-openai-moderation-api-response.textA sample JSON response from the OpenAI Moderation API showing flagged categories and model metadata.Exact payloads, commands, or snippets shown in A sample JSON response from the OpenAI Moderation API showing flagged categories and model metadata.

What This Skill Covers

  • Use the moderations endpoint to check whether text or images are potentially harmful. If harmful content is identified, you can take corrective action, like...
  • Main sections: Quickstart, Content classifications.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/moderation