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

# Get Results

> Get batch execution results once a batch reaches COMPLETED status. Receive the raw output or data to download depending on flag selection.



## OpenAPI

````yaml openapi-v0.json get /v0/batches/{id}/results
openapi: 3.0.0
info:
  title: API Documentation
  description: API description
  version: '0'
  contact: {}
servers:
  - url: https://api.promptloop.com/
    description: Production API v0
security: []
tags: []
paths:
  /v0/batches/{id}/results:
    get:
      tags:
        - Batches
      summary: Get Results
      description: >-
        Get batch execution results once a batch reaches COMPLETED status.
        Receive the raw output or data to download depending on flag selection.
      operationId: BatchesController_getBatchResults
      parameters:
        - name: id
          required: true
          in: path
          description: Batch ID to retrieve results from
          schema:
            type: string
        - name: output_type
          required: false
          in: query
          description: Output type (raw, stream, webhook) - default raw
          schema:
            enum:
              - raw
              - stream
              - webhook
            type: string
        - name: webhook_url
          required: false
          in: query
          description: >-
            Webhook URL to send data to (if output_type "webhook" is selected.
            If not set and webhook is selected, it will default to the existing
            webhook associated with the batch if one exists.
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved batch results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetResultResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    GetResultResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        data:
          $ref: '#/components/schemas/RawBatchResultDto'
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
        file:
          $ref: '#/components/schemas/StreamBatchResultDto'
      required:
        - status
        - data
        - message
    ErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: error
        data:
          type: object
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
      required:
        - status
        - data
        - message
    RawBatchResultDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RawBatchResultItemDto'
      required:
        - data
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
    StreamBatchResultDto:
      type: object
      properties:
        file:
          type: string
          format: binary
      required:
        - file
    RawBatchResultItemDto:
      type: object
      properties:
        data_uuid:
          type: string
      required:
        - data_uuid
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````