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

# Get Batch Results

> Fetch scored rows from a completed batch at /v1/reflex/asynchronous_batches/{batch_id}/results

## Overview

Returns the per-row predictions for a completed asynchronous batch. Rows for batches still in progress return once the batch reaches a terminal state — check [status](/api-reference/endpoint/reflex-batch-status) first.


## OpenAPI

````yaml GET /v1/reflex/asynchronous_batches/{batch_id}/results
openapi: 3.1.0
info:
  title: Morph API
  version: 1.1.0
  description: >-
    The Morph public API at api.morphllm.com: OpenAI- and Anthropic-compatible
    inference (chat completions, messages), Fast Apply code editing, Compact
    context compression, Reflex classification, and fine-tuning. Model ids,
    prices, and context windows are served live at
    https://www.morphllm.com/api/models/json.
  contact:
    name: Morph
    url: https://morphllm.com
    email: info@morphllm.com
  license:
    name: Proprietary
    url: https://morphllm.com/privacy/tos
servers:
  - url: https://api.morphllm.com
    description: Production
security: []
tags:
  - name: chat
    description: >-
      OpenAI- and Anthropic-compatible chat inference, including Fast Apply and
      WarpGrep models.
  - name: compact
    description: Context compression for long agent conversations.
  - name: reflex
    description: 'Per-turn classifiers: realtime prediction and batches.'
  - name: fine-tuning
    description: Reflex fine-tuning job lifecycle.
  - name: models
    description: Model listing and management.
  - name: telemetry
    description: Usage reporting hooks.
paths:
  /v1/reflex/asynchronous_batches/{batch_id}/results:
    get:
      tags:
        - reflex
      summary: Fetch async batch results
      description: >-
        Return the status block plus a `results` array — one entry per row,
        keyed by your `id`, as inline JSON. A row is `completed` (carries
        `predictions`), `failed` (carries an `error`), or still `pending` if you
        fetch before the batch finishes.
      operationId: getReflexBatchResults
      parameters:
        - schema:
            type: string
            description: Batch whose rows you want back.
            example: rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
          required: true
          description: The batch to read results from, once its rows have drained.
          name: batch_id
          in: path
      responses:
        '200':
          description: Batch results.
          content:
            application/json:
              example:
                id: rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
                object: reflex.batch.results
                status: completed
                request_counts:
                  total: 2
                  completed: 2
                  failed: 0
                results:
                  - id: row-1
                    status: completed
                    predictions:
                      - model: guardrail
                        mode: multi_label
                        classes:
                          - class_id: 0
                            label: jailbreak
                            score: 0.98
                            selected: true
                          - class_id: 1
                            label: benign
                            score: 0.02
                            selected: false
                  - id: row-2
                    status: failed
                    error:
                      type: input_too_long
                      message: text exceeds the token limit
              schema:
                $ref: '#/components/schemas/ReflexBatchResults'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth: []
components:
  schemas:
    ReflexBatchResults:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the batch these results belong to.
          example: rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
        object:
          type: string
          description: Object type, always `reflex.batch.results`.
          example: reflex.batch.results
        status:
          type: string
          description: Status of the batch at the time you fetched the results.
          example: completed
        request_counts:
          type: object
          properties:
            total:
              type: integer
              description: Rows in the batch.
              example: 2
            completed:
              type: integer
              description: Rows that produced predictions.
              example: 2
            failed:
              type: integer
              description: Rows that ended in an error.
              example: 0
          required:
            - total
            - completed
            - failed
          description: Final tally of the batch once it has drained.
          example:
            total: 2
            completed: 2
            failed: 0
        results:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The row id you uploaded.
                example: row-1
              status:
                type: string
                enum:
                  - completed
                  - failed
                  - pending
                description: >-
                  Outcome for this row; `pending` if you fetch before the batch
                  finishes.
                example: completed
              predictions:
                type: array
                items:
                  $ref: '#/components/schemas/ReflexPrediction'
                description: One prediction per model named on the uploaded row.
                example:
                  - model: guardrail
                    mode: multi_label
                    classes:
                      - class_id: 0
                        label: jailbreak
                        score: 0.98
                        selected: true
                      - class_id: 1
                        label: benign
                        score: 0.02
                        selected: false
              error:
                allOf:
                  - $ref: '#/components/schemas/ReflexRowError'
                  - description: Failure detail, present only on a failed row.
            required:
              - id
              - status
          description: >-
            One entry per uploaded row, keyed by your `id`, returned as inline
            JSON.
          example:
            - id: row-1
              status: completed
              predictions:
                - model: guardrail
                  mode: multi_label
                  classes:
                    - class_id: 0
                      label: jailbreak
                      score: 0.98
                      selected: true
                    - class_id: 1
                      label: benign
                      score: 0.02
                      selected: false
            - id: row-2
              status: failed
              error:
                type: input_too_long
                message: text exceeds the token limit
      required:
        - id
        - object
        - status
        - request_counts
        - results
      description: Async batch status plus a per-row `results` array.
      example:
        id: rbatch-a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d
        object: reflex.batch.results
        status: completed
        request_counts:
          total: 2
          completed: 2
          failed: 0
        results:
          - id: row-1
            status: completed
            predictions:
              - model: guardrail
                mode: multi_label
                classes:
                  - class_id: 0
                    label: jailbreak
                    score: 0.98
                    selected: true
                  - class_id: 1
                    label: benign
                    score: 0.02
                    selected: false
          - id: row-2
            status: failed
            error:
              type: input_too_long
              message: text exceeds the token limit
    ReflexPrediction:
      type: object
      properties:
        model:
          type: string
          description: The Reflex that produced this result.
          example: jailbreak
        mode:
          type: string
          enum:
            - single_label
            - multi_label
          description: >-
            `single_label` scores are a softmax summing to 1 (at most one
            selected); `multi_label` scores are independent 0–1 (zero or more
            selected).
          example: single_label
        classes:
          type: array
          items:
            $ref: '#/components/schemas/ReflexClass'
          description: Every class this Reflex scores, ordered by class index.
          example:
            - class_id: 0
              label: jailbreak
              score: 0.98
              selected: true
            - class_id: 1
              label: benign
              score: 0.02
              selected: false
        error:
          type: string
          description: Present instead of `classes` when this model failed.
          example: model not ready
      required:
        - model
        - mode
      description: >-
        One classifier's result. In a multi-model or batch response a failed
        model returns `error` instead of `classes`, without sinking its
        siblings.
      example:
        model: jailbreak
        mode: single_label
        classes:
          - class_id: 0
            label: jailbreak
            score: 0.98
            selected: true
          - class_id: 1
            label: benign
            score: 0.02
            selected: false
    ReflexRowError:
      type: object
      properties:
        type:
          type: string
          description: Machine-readable reason the row was rejected.
          example: input_too_long
        message:
          type: string
          description: What went wrong for this specific row.
          example: text exceeds the token limit
      required:
        - type
        - message
      description: Per-row failure inside a batch result.
      example:
        type: input_too_long
        message: text exceeds the token limit
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request_error
              description: Machine-readable error code.
            message:
              type: string
              example: The request body is missing the `model` field.
              description: Human-readable explanation of the failure.
          required:
            - code
            - message
      required:
        - error
      description: Standard error envelope returned by every non-2xx response.
      example:
        error:
          code: invalid_request_error
          message: The request body is missing the `model` field.
    ReflexClass:
      type: object
      properties:
        class_id:
          type: integer
          description: Stable index of the class.
          example: 0
        label:
          type: string
          description: The class name.
          example: jailbreak
        score:
          type: number
          description: Confidence for this class, 0–1.
          example: 0.98
        selected:
          type: boolean
          description: >-
            Whether the server picked this class (top scorer above its
            threshold). A Reflex can select nothing.
          example: true
      required:
        - class_id
        - label
        - score
        - selected
      description: One scored class inside a prediction.
      example:
        class_id: 0
        label: jailbreak
        score: 0.98
        selected: true
  responses:
    BadRequest:
      description: Malformed request — missing or invalid fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request_error
              message: The request body is missing the `model` field.
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: Invalid API key provided.
    NotFound:
      description: The requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: No fine-tuning job found with id ftjob-8f2k1.
    RateLimited:
      description: Rate limited — retry after the interval in the Retry-After header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: rate_limited
              message: Too many requests. Retry in 12 seconds.
    InternalError:
      description: Internal error — safe to retry with backoff.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: internal_error
              message: Something went wrong on our side.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        Morph API key, passed as `Authorization: Bearer sk-...`. Create keys at
        https://www.morphllm.com/dashboard/api-keys.

````