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

> Retrieves detailed metadata for the batch with provided id. This includes the batch status, job count, and other metadata.



## OpenAPI

````yaml openapi-v0.json get /v0/batches/{id}
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}:
    get:
      tags:
        - Batches
      summary: Get Batch
      description: >-
        Retrieves detailed metadata for the batch with provided id. This
        includes the batch status, job count, and other metadata.
      operationId: BatchesController_getBatchFromId
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved batch from id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBatchDataWithStatusResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '404':
          description: Not Found
          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:
    GetBatchDataWithStatusResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        data:
          $ref: '#/components/schemas/BatchDataWithStatusResponseDto'
        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
    BatchDataWithStatusResponseDto:
      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
        jobs_submitted:
          type: number
        jobs_completed:
          type: number
        job_status:
          type: string
      required:
        - batch_id
        - task_id
        - task_version
        - batch_name
        - created_at
        - completed
        - cancelled
        - jobs_submitted
        - jobs_completed
        - job_status
    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

````