OpenAI APIs · Schema

OpenAI Moderation Result

Represents a content moderation result classifying text against categories such as hate, harassment, self-harm, sexual content, and violence.

Artificial IntelligenceEmbeddingsImage-GenerationLanguage ModelsSpeech

Properties

Name Type Description
flagged boolean Whether the content was flagged as potentially harmful
categories object Boolean flags for each moderation category
category_scores object Confidence scores for each moderation category (0-1)
View JSON Schema on GitHub

JSON Schema

openai-moderation-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.openai.com/schemas/openai/moderation.json",
  "title": "OpenAI Moderation Result",
  "description": "Represents a content moderation result classifying text against categories such as hate, harassment, self-harm, sexual content, and violence.",
  "type": "object",
  "properties": {
    "flagged": {
      "type": "boolean",
      "description": "Whether the content was flagged as potentially harmful"
    },
    "categories": {
      "type": "object",
      "properties": {
        "hate": {
          "type": "boolean",
          "description": "Content expressing hate toward a group"
        },
        "hate/threatening": {
          "type": "boolean",
          "description": "Hateful content including violence or threats"
        },
        "harassment": {
          "type": "boolean",
          "description": "Content that harasses a target"
        },
        "harassment/threatening": {
          "type": "boolean",
          "description": "Harassment including violence or threats"
        },
        "self-harm": {
          "type": "boolean",
          "description": "Content promoting or depicting self-harm"
        },
        "self-harm/intent": {
          "type": "boolean",
          "description": "Content expressing intent to self-harm"
        },
        "self-harm/instructions": {
          "type": "boolean",
          "description": "Content providing self-harm instructions"
        },
        "sexual": {
          "type": "boolean",
          "description": "Sexual content"
        },
        "sexual/minors": {
          "type": "boolean",
          "description": "Sexual content involving minors"
        },
        "violence": {
          "type": "boolean",
          "description": "Content depicting violence"
        },
        "violence/graphic": {
          "type": "boolean",
          "description": "Graphic violence content"
        }
      },
      "description": "Boolean flags for each moderation category"
    },
    "category_scores": {
      "type": "object",
      "properties": {
        "hate": { "type": "number" },
        "hate/threatening": { "type": "number" },
        "harassment": { "type": "number" },
        "harassment/threatening": { "type": "number" },
        "self-harm": { "type": "number" },
        "self-harm/intent": { "type": "number" },
        "self-harm/instructions": { "type": "number" },
        "sexual": { "type": "number" },
        "sexual/minors": { "type": "number" },
        "violence": { "type": "number" },
        "violence/graphic": { "type": "number" }
      },
      "description": "Confidence scores for each moderation category (0-1)"
    }
  },
  "required": ["flagged", "categories", "category_scores"]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/openai-moderation"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.