> ## Documentation Index
> Fetch the complete documentation index at: https://zerogpu-claude-friendly-johnson-fww5io.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# zlm-v1-moderation-edge

> Model details for zlm-v1-moderation-edge. OpenAI-compatible moderation, benchmarked against omni-moderation-latest.

<Note>
  This model is routable only on `/v1/moderations`. Send the text to classify as
  `input` — a string, an array of strings, or an array of
  `{"type": "text", "text": "…"}` content parts. The response is OpenAI's native
  moderations envelope, `{ id, model, results[] }`, with each result carrying a
  `flagged` verdict, per-category `categories` booleans, and calibrated
  `category_scores` — so it drops into any pipeline written against
  `omni-moderation-latest`.
</Note>

> ZeroGPU's moderation model screens text for unsafe, harmful, or policy-sensitive content and returns the complete OpenAI 13-category taxonomy (a `flagged` verdict, per-category booleans, and calibrated `category_scores`), so it drops into any pipeline written against `omni-moderation-latest`. Under the hood it's an 86M-parameter DeBERTa encoder with a shared trunk feeding one binary safe/unsafe head and 13 category heads, with per-category thresholds calibrated on held-out validation data. In [head-to-head benchmarks](https://zerogpu.ai/benchmarks/moderation-edge) against OpenAI omni-moderation it wins the binary safe/unsafe decision (0.899 vs 0.853 F1) and 9 of 13 harm categories, with the largest gains on graphic violence, illicit content, and self-harm, while returning verdicts 1.2–1.8× faster at the median on production-range inputs, because inference is co-located at the edge instead of a round trip to a central API. Moderation sits inline in front of every response your app serves; this is the model that's fast and accurate enough to live there.

**References:** [Moderation benchmark](https://zerogpu.ai/benchmarks/moderation-edge) • [Terms](https://zerogpu.ai/terms) • [Privacy](https://zerogpu.ai/privacy-policy)


## OpenAPI

````yaml api-reference/openapi/playgrounds/zlm-v1-moderation-edge.openapi.json POST /moderations
openapi: 3.1.0
info:
  title: zlm-v1-moderation-edge playground
  version: '1.0'
  description: >-
    Interactive playground for **zlm-v1-moderation-edge**.

    Model is always `zlm-v1-moderation-edge` on this page (shown in the form,
    not editable).

    Moderation models are routable only on `/v1/moderations` — they 400 on
    `/v1/responses` and `/v1/chat/completions`.

    The response is OpenAI's moderations envelope (`{ id, model, results[] }`).

    Authentication: `x-api-key` (required) and `x-project-id` (optional).
servers:
  - url: https://api.zerogpu.ai/v1
    description: Production
security:
  - ApiKey: []
paths:
  /moderations:
    post:
      tags:
        - zlm-v1-moderation-edge
      summary: 'zlm-v1-moderation-edge: Moderations'
      operationId: createModeration_zlm-v1-moderation-edge
      parameters:
        - name: x-project-id
          in: header
          required: false
          schema:
            type: string
          description: >-
            Optional project identifier. Scopes the request to a specific
            project when provided.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateModerationRequest'
                - type: object
                  properties:
                    model:
                      type: string
                      const: zlm-v1-moderation-edge
                      default: zlm-v1-moderation-edge
                      example: zlm-v1-moderation-edge
                      description: Model identifier (fixed for this playground).
            examples:
              default:
                summary: Default
                value:
                  input:
                    - text: >-
                        I am so angry at this person that I want to hurt them.
                        They are worthless and should be scared of what I might
                        do next.
                      type: text
                  model: zlm-v1-moderation-edge
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModerationResponse'
              examples:
                default:
                  summary: Default
                  value:
                    id: modr-0a1b2c3d4e5f60718293a4b5c6d7e8f90
                    model: zlm-v1-moderation-edge
                    results:
                      - flagged: true
                        categories:
                          harassment: true
                          harassment/threatening: true
                          hate: false
                          hate/threatening: false
                          illicit: true
                          illicit/violent: true
                          self-harm: false
                          self-harm/intent: false
                          self-harm/instructions: false
                          sexual: false
                          sexual/minors: false
                          violence: true
                          violence/graphic: false
                        category_scores:
                          harassment: 0.82545
                          harassment/threatening: 0.957703
                          hate: 0.21574
                          hate/threatening: 0.168273
                          illicit: 0.732167
                          illicit/violent: 0.780693
                          self-harm: 0.015232
                          self-harm/intent: 0.017179
                          self-harm/instructions: 0.01807
                          sexual: 0.035671
                          sexual/minors: 0.094207
                          violence: 0.665897
                          violence/graphic: 0.198346
                        category_applied_input_types:
                          harassment:
                            - text
                          harassment/threatening:
                            - text
                          hate:
                            - text
                          hate/threatening:
                            - text
                          illicit:
                            - text
                          illicit/violent:
                            - text
                          self-harm:
                            - text
                          self-harm/intent:
                            - text
                          self-harm/instructions:
                            - text
                          sexual:
                            - text
                          sexual/minors:
                            - text
                          violence:
                            - text
                          violence/graphic:
                            - text
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '420':
          description: Insufficient quota
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
components:
  schemas:
    CreateModerationRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          const: zlm-v1-moderation-edge
          default: zlm-v1-moderation-edge
          example: zlm-v1-moderation-edge
          description: Model identifier (fixed for this playground).
        input:
          description: >-
            Text to classify. Accepts a single string, an array of strings (one
            result per element), or an array of content parts (`{ "type":
            "text", "text": "..." }`) that form a single multi-modal input.
          oneOf:
            - type: string
              minLength: 1
              format: textarea
              maxLength: 131072
            - type: array
              minItems: 1
              items:
                type: string
                minLength: 1
                maxLength: 131072
            - type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/InputContentPart'
    ModerationResponse:
      type: object
      description: OpenAI-compatible moderations envelope. One `results` entry per input.
      properties:
        id:
          type: string
          description: Unique identifier for the moderation request.
          example: modr-0a1b2c3d4e5f60718293a4b5c6d7e8f90
        model:
          type: string
          description: The model used for classification.
          example: zlm-v1-moderation-edge
        results:
          type: array
          description: >-
            Moderation verdicts, one per input (a string input yields a
            single-element array).
          items:
            $ref: '#/components/schemas/ModerationResult'
    ErrorResponse:
      type: object
      additionalProperties: true
    InputContentPart:
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          const: text
          default: text
        text:
          type: string
          minLength: 1
          format: textarea
          maxLength: 131072
          description: Text content of this part.
    ModerationResult:
      type: object
      description: A single entry of the `results` array — the verdict for one input.
      properties:
        flagged:
          type: boolean
          description: True when the model flagged the input in one or more categories.
          example: true
        categories:
          $ref: '#/components/schemas/ModerationCategories'
        category_scores:
          $ref: '#/components/schemas/ModerationCategoryScores'
        category_applied_input_types:
          $ref: '#/components/schemas/ModerationAppliedInputTypes'
    ModerationCategories:
      type: object
      description: >-
        Per-category boolean verdicts. All 13 categories are always present, in
        OpenAI's order.
      properties:
        harassment:
          type: boolean
          description: >-
            Content that expresses, incites, or promotes harassing language
            towards any target.
          example: true
        harassment/threatening:
          type: boolean
          description: >-
            Harassment that also includes violence or serious harm towards any
            target.
          example: true
        hate:
          type: boolean
          description: >-
            Content that expresses, incites, or promotes hate based on a
            protected attribute.
          example: false
        hate/threatening:
          type: boolean
          description: >-
            Hateful content that also includes violence or serious harm towards
            a protected group.
          example: false
        illicit:
          type: boolean
          description: >-
            Content that gives advice or instruction on how to commit a
            wrongdoing.
          example: false
        illicit/violent:
          type: boolean
          description: Illicit content that also references violence or procuring a weapon.
          example: false
        self-harm:
          type: boolean
          description: Content that promotes, encourages, or depicts acts of self-harm.
          example: false
        self-harm/intent:
          type: boolean
          description: >-
            Content where the speaker expresses that they are engaging or intend
            to engage in self-harm.
          example: false
        self-harm/instructions:
          type: boolean
          description: >-
            Content that provides instructions or advice on how to commit acts
            of self-harm.
          example: false
        sexual:
          type: boolean
          description: >-
            Content meant to arouse sexual excitement or that promotes sexual
            services.
          example: false
        sexual/minors:
          type: boolean
          description: Sexual content that includes an individual under 18 years old.
          example: false
        violence:
          type: boolean
          description: Content that depicts death, violence, or physical injury.
          example: true
        violence/graphic:
          type: boolean
          description: >-
            Content that depicts death, violence, or physical injury in graphic
            detail.
          example: false
    ModerationCategoryScores:
      type: object
      description: >-
        Per-category confidence scores in [0, 1]. All 13 categories are always
        present, in OpenAI's order.
      properties:
        harassment:
          type: number
          description: Confidence score for `harassment`.
          example: 0.9412
        harassment/threatening:
          type: number
          description: Confidence score for `harassment/threatening`.
          example: 0.9016
        hate:
          type: number
          description: Confidence score for `hate`.
          example: 0.0231
        hate/threatening:
          type: number
          description: Confidence score for `hate/threatening`.
          example: 0.0104
        illicit:
          type: number
          description: Confidence score for `illicit`.
          example: 0.0057
        illicit/violent:
          type: number
          description: Confidence score for `illicit/violent`.
          example: 0.0039
        self-harm:
          type: number
          description: Confidence score for `self-harm`.
          example: 0.0021
        self-harm/intent:
          type: number
          description: Confidence score for `self-harm/intent`.
          example: 0.0012
        self-harm/instructions:
          type: number
          description: Confidence score for `self-harm/instructions`.
          example: 0.0008
        sexual:
          type: number
          description: Confidence score for `sexual`.
          example: 0.0006
        sexual/minors:
          type: number
          description: Confidence score for `sexual/minors`.
          example: 0.0002
        violence:
          type: number
          description: Confidence score for `violence`.
          example: 0.8774
        violence/graphic:
          type: number
          description: Confidence score for `violence/graphic`.
          example: 0.0311
    ModerationAppliedInputTypes:
      type: object
      description: >-
        Which input modality triggered each category. This is a text-only model,
        so every category maps to ["text"].
      properties:
        harassment:
          type: array
          items:
            type: string
          example:
            - text
        harassment/threatening:
          type: array
          items:
            type: string
          example:
            - text
        hate:
          type: array
          items:
            type: string
          example:
            - text
        hate/threatening:
          type: array
          items:
            type: string
          example:
            - text
        illicit:
          type: array
          items:
            type: string
          example:
            - text
        illicit/violent:
          type: array
          items:
            type: string
          example:
            - text
        self-harm:
          type: array
          items:
            type: string
          example:
            - text
        self-harm/intent:
          type: array
          items:
            type: string
          example:
            - text
        self-harm/instructions:
          type: array
          items:
            type: string
          example:
            - text
        sexual:
          type: array
          items:
            type: string
          example:
            - text
        sexual/minors:
          type: array
          items:
            type: string
          example:
            - text
        violence:
          type: array
          items:
            type: string
          example:
            - text
        violence/graphic:
          type: array
          items:
            type: string
          example:
            - text
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key

````