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

# Submit text moderation

> Submit text for moderation. Returns a job ID for polling or webhook delivery. The pipeline runs keyword filtering and an LLM prohibition check; prohibited text is rejected, with the reason returned on the completed job. The prohibition check also evaluates every custom category enabled on your account, and names the one that tripped in the reason. Multipart requests allow at most eight non-file fields. Each field other than `text` must be at most 16,384 UTF-8 bytes. Oversized fields return 400; too many fields return 413.

<Note>
  Requires the `moderate:text` scope. Requests without this scope receive a `403 FORBIDDEN`
  response. See [authentication](/authentication#scopes).
</Note>

<Note>
  The `text` field is limited to 20,000 characters. Longer input is rejected with `400
      INVALID_REQUEST` before a job is created or billed. Split longer documents into chunks and submit
  each one.
</Note>


## OpenAPI

````yaml api-reference/openapi.json POST /api/v1/moderate/text
openapi: 3.1.0
info:
  title: Omnifence API
  description: >-
    Content moderation API. Clients submit images or videos which pass through a
    classification pipeline and receive a pass/reject decision.
  version: 1.0.0
  contact:
    email: support@omnifence.ai
servers:
  - url: http://localhost:3051
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Moderation
    description: Submit moderation jobs
  - name: Jobs
    description: Query job status and progress
  - name: Webhooks
    description: Webhook registration
  - name: Account
    description: Authenticated client account settings
paths:
  /api/v1/moderate/text:
    post:
      tags:
        - Moderation
      summary: Submit text moderation
      description: >-
        Submit text for moderation. Returns a job ID for polling or webhook
        delivery. The pipeline runs keyword filtering and an LLM prohibition
        check; prohibited text is rejected, with the reason returned on the
        completed job. The prohibition check also evaluates every custom
        category enabled on your account, and names the one that tripped in the
        reason. Multipart requests allow at most eight non-file fields. Each
        field other than `text` must be at most 16,384 UTF-8 bytes. Oversized
        fields return 400; too many fields return 413.
      operationId: submitTextModeration
      responses:
        '202':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  job_id:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - queued
                required:
                  - job_id
                  - status
        '503':
          description: >-
            Moderation intake is busy or a dependency is unavailable. Capacity
            rejections include Retry-After (seconds); retry with backoff and
            jitter. SUBMISSION_STATUS_UNKNOWN includes a job_id: poll it before
            submitting again because acceptance could not be confirmed.
          content:
            application/json:
              schema:
                description: >-
                  Moderation intake is busy or a dependency is unavailable.
                  Capacity rejections include Retry-After (seconds); retry with
                  backoff and jitter. SUBMISSION_STATUS_UNKNOWN includes a
                  job_id: poll it before submitting again because acceptance
                  could not be confirmed.
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    enum:
                      - 503
                  job_id:
                    type: string
                    format: uuid
                    description: Recovery ID when the acceptance outcome is unknown.
                required:
                  - error
                  - message
                  - statusCode
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST https://api.omnifence.ai/api/v1/moderate/text \
              -H "Authorization: Bearer $OMNIFENCE_API_KEY" \
              -F "text=A beautiful sunset over the ocean" \
              -F "webhook_url=https://your-app.com/webhooks/omnifence"  # optional
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key from the Omnifence dashboard

````