> ## 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 All Batches

> Retrieves a list of the high-level metadata for all batches (paginated).



## OpenAPI

````yaml openapi-v0.json get /v0/batches
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:
    get:
      tags:
        - Batches
      summary: Get All Batches
      description: Retrieves a list of the high-level metadata for all batches (paginated).
      operationId: BatchesController_getBatches
      parameters: []
      responses:
        '200':
          description: Successfully retrieved batches
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBatchesResponseDto'
        '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:
    GetBatchesResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        data:
          type: array
          items:
            $ref: '#/components/schemas/BatchDataResponseDto'
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
      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
    BatchDataResponseDto:
      type: object
      properties:
        batch_id:
          type: string
        task_id:
          type: string
        task_version:
          type: string
        batch_name:
          type: string
        created_at:
          format: date-time
          type: string
        completed:
          type: boolean
        cancelled:
          type: boolean
      required:
        - batch_id
        - task_id
        - task_version
        - batch_name
        - created_at
        - completed
        - cancelled
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````