{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-cognitive-services/json-schema/microsoft-cognitive-services-rai-content-filter-schema.json",
  "title": "RaiContentFilter",
  "description": "Azure OpenAI Content Filter.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-cognitive-services-raicontentfilters-api-openapi.yml#/components/schemas/RaiContentFilter",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/RaiContentFilterProperties",
      "description": "Azure OpenAI Content Filter Properties."
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "RaiContentFilterProperties": {
      "type": "object",
      "description": "Azure OpenAI Content Filter Properties.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of Content Filter."
        },
        "isMultiLevelFilter": {
          "type": "boolean",
          "description": "If the Content Filter has multi severity levels(Low, Medium, or High)."
        },
        "source": {
          "$ref": "#/$defs/RaiPolicyContentSource",
          "description": "Content source to apply the Content Filters."
        }
      }
    },
    "RaiPolicyContentSource": {
      "type": "string",
      "description": "Content source to apply the Content Filters.",
      "enum": [
        "Prompt",
        "Completion",
        "PreToolCall",
        "PostToolCall",
        "PreRun",
        "PostRun"
      ],
      "x-ms-enum": {
        "name": "RaiPolicyContentSource",
        "modelAsString": true,
        "values": [
          {
            "name": "Prompt",
            "value": "Prompt"
          },
          {
            "name": "Completion",
            "value": "Completion"
          },
          {
            "name": "PreToolCall",
            "value": "PreToolCall"
          },
          {
            "name": "PostToolCall",
            "value": "PostToolCall"
          },
          {
            "name": "PreRun",
            "value": "PreRun"
          },
          {
            "name": "PostRun",
            "value": "PostRun"
          }
        ]
      }
    }
  }
}