> ## 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.

# Get a text moderation batch

> Read every item decision of a batch. Each item shows its current decision. The batch `status` is `completed` once every item is `completed` or `failed`; the body is then the same as the batch webhook body, without `delivery_id`.

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

The batch `status` stays `processing` until every item is `completed` or `failed`. Each item shows
its own decision as soon as it has one. Match items by `key`, not by position: the response orders
them by key.

A batch ID that does not exist, or that belongs to a different account, returns `404
BATCH_NOT_FOUND`.


## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/moderate/text/batch/{batch_id}
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: Shared Registry
    description: >-
      Cross-platform banned-user registry for vetted members (requires
      registry:check or registry:submit)
  - name: Account
    description: Authenticated client account settings
paths:
  /api/v1/moderate/text/batch/{batch_id}:
    get:
      tags:
        - Moderation
      summary: Get a text moderation batch
      description: >-
        Read every item decision of a batch. Each item shows its current
        decision. The batch `status` is `completed` once every item is
        `completed` or `failed`; the body is then the same as the batch webhook
        body, without `delivery_id`.
      operationId: getTextModerationBatch
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: batch_id
          required: true
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - text_batch
                  batch_id:
                    type: string
                    format: uuid
                  status:
                    type: string
                    enum:
                      - processing
                      - completed
                    description: >-
                      `completed` once every item is `completed` or `failed`, in
                      the same step that sends the batch webhook.
                  created_at:
                    type: string
                    format: date-time
                  completed_at:
                    type:
                      - 'null'
                      - string
                    format: date-time
                  items:
                    type: array
                    description: >-
                      One decision for each item, ordered by key. Match items by
                      `key`.
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        job_id:
                          type: string
                          format: uuid
                        status:
                          type: string
                          enum:
                            - queued
                            - processing
                            - completed
                            - failed
                        is_prohibited:
                          type:
                            - 'null'
                            - boolean
                          description: >-
                            `true` rejects the item, `false` passes it, `null`
                            while pending or on failure.
                        reason:
                          type: string
                          description: Why the item was rejected. Only on a rejection.
                        error_code:
                          type: string
                          description: >-
                            Why the item failed. Only on a failed item, when a
                            cause is known.
                      required:
                        - key
                        - job_id
                        - status
                        - is_prohibited
                required:
                  - type
                  - batch_id
                  - status
                  - created_at
                  - completed_at
                  - items
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key from the Omnifence dashboard

````

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