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

# Validate Batch Data

> Uploads a JSONL file and validates the data for a new batch with the provided data. Returns the batch id.



## OpenAPI

````yaml openapi-v0.json post /v0/batches/validate-data
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/validate-data:
    post:
      tags:
        - Batches
      summary: Validate Batch Data
      description: >-
        Uploads a JSONL file and validates the data for a new batch with the
        provided data. Returns the batch id.
      operationId: BatchesController_validateBatchData
      parameters: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/BatchValidateJobDataDto'
      responses:
        '200':
          description: Batch data successfully validated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateBatchDataResponseDto'
        '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:
    BatchValidateJobDataDto:
      type: object
      properties:
        batch_input_data:
          type: string
          format: binary
          description: >-
            A JSONL file containing objects to validate with the format: {
            "data_uuid": string, "inputs": array }
          example:
            - data_uuid: string
              inputs:
                - string
        task_id:
          type: string
      required:
        - batch_input_data
        - task_id
    ValidateBatchDataResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: success
        data:
          type: array
          items:
            $ref: '#/components/schemas/BatchLaunchDataValidationResponseDto'
        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
    BatchLaunchDataValidationResponseDto:
      type: object
      properties:
        job_count:
          type: number
        job_improper_format_count:
          type: number
        job_improper_format:
          type: array
          items:
            $ref: '#/components/schemas/BatchLaunchJobErrorDto'
      required:
        - job_count
        - job_improper_format_count
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
    BatchLaunchJobErrorDto:
      type: object
      properties:
        error_index:
          type: number
        error_message:
          type: string
      required:
        - error_index
        - error_message
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````