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

# Launch uploaded batch

> Launch the team-scoped JSONL file. Repeating the same upload_id returns the existing batch without queueing work again. The upload_id is the batch_id for status checks.



## OpenAPI

````yaml /openapi-v0.1.json post /v0.1/batches/from-upload
openapi: 3.0.0
info:
  title: PromptLoop API
  version: 0.1.0
  description: >-
    Run PromptLoop research tasks, manage asynchronous batches, and create
    company-list exports.
  contact:
    name: PromptLoop Support
    email: help@promptloop.com
    url: https://promptloop.com
servers:
  - url: https://api.promptloop.com
    description: Production
security: []
tags:
  - name: Tasks
    description: Create, inspect, test, and run research tasks.
  - name: Batches
    description: Run and manage asynchronous JSONL workloads.
  - name: Company Lists
    description: Search for companies and create downloadable dataset exports.
  - name: Team
    description: Inspect team usage and plan limits.
paths:
  /v0.1/batches/from-upload:
    post:
      tags:
        - Batches
      summary: Launch uploaded batch
      description: >-
        Launch the team-scoped JSONL file. Repeating the same upload_id returns
        the existing batch without queueing work again. The upload_id is the
        batch_id for status checks.
      operationId: createBatchFromUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchUploadedLaunchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchUploadedLaunchResponse'
        '400':
          description: Invalid input or missing/expired upload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '503':
          description: Upload lifecycle expiration has not been configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    BatchUploadedLaunchRequest:
      type: object
      required:
        - upload_id
        - task_id
      properties:
        upload_id:
          type: string
          format: uuid
        task_id:
          type: string
          format: uuid
        task_version:
          type: integer
          minimum: 0
          default: 0
        batch_name:
          type: string
          maxLength: 500
        webhook_url:
          type: string
          format: uri
    BatchUploadedLaunchResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
        data:
          anyOf:
            - $ref: '#/components/schemas/BatchLaunchDto'
            - $ref: '#/components/schemas/BatchDataWithStatusResponseDto'
        message:
          type: string
        request_id:
          type: string
      required:
        - status
        - data
    ErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: error
        data:
          type: object
          nullable: true
        message:
          type: string
        error:
          allOf:
            - $ref: '#/components/schemas/ErrorDetailsDto'
          nullable: true
        request_id:
          type: string
          description: Correlation identifier for support and request tracing.
      required:
        - status
        - data
        - message
    BatchLaunchDto:
      type: object
      properties:
        batch_id:
          type: string
        jobs_submitted:
          type: integer
          format: int32
        jobs_added:
          type: integer
          format: int32
        jobs_failed_error_indexes:
          type: array
          items:
            $ref: '#/components/schemas/BatchLaunchJobErrorDto'
        estimated_time_to_start:
          format: date-time
          type: string
        estimated_time_to_complete:
          format: date-time
          type: string
        webhook_url:
          type: string
          nullable: true
      required:
        - batch_id
        - jobs_submitted
        - jobs_added
    BatchDataWithStatusResponseDto:
      type: object
      properties:
        batch_id:
          type: string
        task_id:
          type: string
          nullable: true
        task_version:
          type: integer
          format: int32
          nullable: true
        batch_name:
          type: string
          nullable: true
        created_at:
          format: date-time
          type: string
          nullable: true
        completed:
          type: boolean
          nullable: true
        cancelled:
          type: boolean
          nullable: true
        jobs_submitted:
          type: integer
          format: int32
        jobs_completed:
          type: integer
          format: int32
        job_status:
          type: string
        webhook_url:
          type: string
          nullable: true
      required:
        - batch_id
        - task_id
        - task_version
        - batch_name
        - created_at
        - completed
        - cancelled
        - jobs_submitted
        - jobs_completed
        - job_status
        - webhook_url
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
    BatchLaunchJobErrorDto:
      type: object
      properties:
        error_index:
          type: integer
          format: int32
        error_message:
          type: string
      required:
        - error_index
        - error_message
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.