> ## Documentation Index
> Fetch the complete documentation index at: https://portkey-docs-docs-prisma-airs-updates.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create moderation



## OpenAPI

````yaml https://raw.githubusercontent.com/PaloAltoNetworks/openapi/refs/heads/main/openapi.yaml post /moderations
openapi: 3.0.0
info:
  title: Prisma AIRS AI Gateway API
  version: 3.0.0
  description: ''
servers:
  - url: https://aigw.portkey.ai/v1
    description: Managed
  - url: https://self-hosted-gateway-url.example.com/v1
    description: Self-hosted -- replace with your own gateway host
security:
  - Authorization: []
tags:
  - name: Assistants
    description: ''
  - name: Audio
    description: ''
  - name: Batch
    description: ''
  - name: Chat
    description: ''
  - name: Completions
    description: ''
  - name: Embeddings
    description: ''
  - name: Files
    description: ''
  - name: Fine-Tuning
    description: ''
  - name: Images
    description: ''
  - name: Model Pricing
    description: ''
  - name: Models
    description: ''
  - name: Moderations
    description: ''
  - name: OCR
    description: ''
  - name: Realtime
    description: ''
  - name: Rerank
    description: ''
  - name: Responses
    description: ''
  - name: Vector Stores
    description: ''
  - name: Configs
    description: ''
  - name: Guardrails
    description: ''
  - name: Integrations
    description: ''
  - name: Integrations > Models
    description: ''
  - name: Integrations > Workspaces
    description: ''
  - name: Providers
    description: ''
  - name: Secret References
    description: ''
  - name: MCP Integrations
    description: ''
  - name: MCP Integrations > Capabilities
    description: ''
  - name: MCP Integrations > Metadata
    description: ''
  - name: MCP Integrations > Workspaces
    description: ''
  - name: MCP Servers
    description: ''
  - name: MCP Servers > Capabilities
    description: ''
  - name: MCP Servers > Connections
    description: ''
  - name: MCP Servers > User Access
    description: ''
  - name: API Keys
    description: ''
  - name: Deployments
    description: ''
  - name: Org Guardrails
    description: ''
  - name: Rate Limit Policies
    description: ''
  - name: Usage Limit Policies
    description: ''
  - name: Analytics > Graphs
    description: ''
  - name: Analytics > Groups
    description: ''
  - name: Analytics > Summary
    description: ''
  - name: Feedback
    description: ''
  - name: Logs
    description: ''
paths:
  /moderations:
    post:
      tags:
        - Moderations
      operationId: createModeration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateModerationRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateModerationResponse'
components:
  schemas:
    CreateModerationRequest:
      type: object
      properties:
        input:
          oneOf:
            - type: string
              default: ''
            - type: array
              items:
                type: string
                default: ''
        model:
          nullable: false
          default: text-moderation-latest
          anyOf:
            - type: string
            - type: string
              enum:
                - text-moderation-latest
                - text-moderation-stable
          x-oaiTypeLabel: string
      required:
        - input
    CreateModerationResponse:
      type: object
      properties:
        id:
          type: string
        model:
          type: string
        results:
          type: array
          items:
            type: object
            properties:
              flagged:
                type: boolean
              categories:
                type: object
                properties:
                  hate:
                    type: boolean
                  hate/threatening:
                    type: boolean
                  harassment:
                    type: boolean
                  harassment/threatening:
                    type: boolean
                  self-harm:
                    type: boolean
                  self-harm/intent:
                    type: boolean
                  self-harm/instructions:
                    type: boolean
                  sexual:
                    type: boolean
                  sexual/minors:
                    type: boolean
                  violence:
                    type: boolean
                  violence/graphic:
                    type: boolean
                required:
                  - hate
                  - hate/threatening
                  - harassment
                  - harassment/threatening
                  - self-harm
                  - self-harm/intent
                  - self-harm/instructions
                  - sexual
                  - sexual/minors
                  - violence
                  - violence/graphic
              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
                required:
                  - hate
                  - hate/threatening
                  - harassment
                  - harassment/threatening
                  - self-harm
                  - self-harm/intent
                  - self-harm/instructions
                  - sexual
                  - sexual/minors
                  - violence
                  - violence/graphic
            required:
              - flagged
              - categories
              - category_scores
      required:
        - id
        - model
        - results
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````