> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# मॉडरेशन बनाएं

> जाँचता है कि पाठ OpenAI की उपयोग नीतियों का उल्लंघन करता है या नहीं।

यह एंडपॉइंट टेक्स्ट इनपुट का मूल्यांकन प्रोवाइडर की मॉडरेशन नीतियों के अनुसार करता है और Gateway द्वारा सामान्यीकृत सुरक्षा स्कोर लौटाता है। पूरी request/response स्कीमा के लिए OpenAPI स्पेक देखें।


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml POST /moderations
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    OpenAI-संगत एंडपॉइंट के माध्यम से विभिन्न AI मॉडल तक पहुँचने के लिए एक गेटवे
    API।
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: वैश्विक रूटिंग
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /moderations:
    post:
      tags:
        - Gateway
      summary: मॉडरेशन जाँच करें
      description: जाँचता है कि पाठ OpenAI की उपयोग नीतियों का उल्लंघन करता है या नहीं।
      operationId: createModeration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModerationsRequest'
      responses:
        '200':
          description: मॉडरेशन प्रतिक्रिया
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModerationsResponse'
components:
  schemas:
    ModerationsRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
        meta:
          type: boolean
          default: false
        debug:
          $ref: '#/components/schemas/DebugOptions'
        input:
          oneOf:
            - type: string
            - type: array
              items:
                oneOf:
                  - $ref: '#/components/schemas/TextModerationInput'
                  - $ref: '#/components/schemas/ImageModerationInput'
        provider:
          $ref: '#/components/schemas/ProviderRoutingOptions'
    ModerationsResponse:
      type: object
      properties:
        id:
          type: string
        model:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/ModerationResult'
        meta:
          type: object
          description: जब अनुरोध `meta` को `true` पर सेट करता है, तब शामिल होता है।
          properties:
            latency_ms:
              type: number
              description: >-
                upstream को भेजे जाने से लेकर प्रतिक्रिया का पहला byte मिलने तक
                का समय, मिलीसेकंड में।
            generation_ms:
              type: number
              description: >-
                रिपोर्ट होने पर प्रदाता का प्रोसेसिंग समय मिलीसेकंड में; अन्यथा
                देखा गया upstream latency।
          additionalProperties: true
    DebugOptions:
      type: object
      description: गेटवे डिबग नियंत्रण। ये फ़्लैग कभी भी प्रदाता को फ़ॉरवर्ड नहीं किए जाते।
      properties:
        enabled:
          type: boolean
        return_upstream_request:
          type: boolean
        return_upstream_response:
          type: boolean
        trace:
          type: boolean
        trace_level:
          type: string
          enum:
            - summary
            - full
    TextModerationInput:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - text
        text:
          type: string
    ImageModerationInput:
      type: object
      required:
        - type
        - image_url
      properties:
        type:
          type: string
          enum:
            - image_url
        image_url:
          type: object
          properties:
            url:
              type: string
              format: uri
    ProviderRoutingOptions:
      type: object
      description: गेटवे चयन के लिए प्रदाता रूटिंग प्राथमिकताएँ।
      properties:
        order:
          type: array
          items:
            type: string
        only:
          type: array
          items:
            type: string
        ignore:
          type: array
          items:
            type: string
        include_alpha:
          type: boolean
          description: रूटिंग में alpha प्रदाताओं को शामिल करें (डिफ़ॉल्ट रूप से बंद)।
        allow_fallbacks:
          type: boolean
          nullable: true
          description: विफलता के बाद किसी अन्य योग्य प्रदाता पर fallback की अनुमति दें।
        require_parameters:
          type: boolean
          nullable: true
          description: >-
            रूटिंग से पहले अनुरोधित पैरामीटरों के लिए प्रदाता का समर्थन आवश्यक
            करें।
        required_execution_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित execution region वाले प्रदाताओं तक सीमित करें।
        required_data_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित data region वाले प्रदाताओं तक सीमित करें।
        require_zero_data_retention:
          type: boolean
          nullable: true
          description: >-
            रूटिंग को उन प्रदाताओं तक सीमित करें जो शून्य डेटा प्रतिधारण का
            समर्थन करते हैं।
        data_collection:
          type: string
          nullable: true
          enum:
            - allow
            - deny
        zdr:
          type: boolean
          nullable: true
        enforce_distillable_text:
          type: boolean
          nullable: true
        quantizations:
          type: array
          nullable: true
          items:
            type: string
        sort:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            इस अनुरोध के लिए प्रदाताओं को क्रम दें, जैसे कीमत, विलंबता या
            थ्रूपुट के आधार पर।
        max_price:
          type: object
          properties:
            prompt:
              oneOf:
                - type: number
                - type: string
            completion:
              oneOf:
                - type: number
                - type: string
            image:
              oneOf:
                - type: number
                - type: string
            audio:
              oneOf:
                - type: number
                - type: string
            request:
              oneOf:
                - type: number
                - type: string
        preferred_min_throughput:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
        preferred_max_latency:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
    ModerationResult:
      type: object
      properties:
        flagged:
          type: boolean
        categories:
          $ref: '#/components/schemas/ModerationCategories'
        category_scores:
          $ref: '#/components/schemas/ModerationCategoryScores'
    ModerationCategories:
      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
    ModerationCategoryScores:
      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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.