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

# Prepare large batch upload

> Upload up to 100,000 JSONL rows / 100 MiB directly to S3 using the returned multipart POST URL and fields, then call createBatchFromUpload. Input objects expire after one day; upload credentials expire after 15 minutes.



## OpenAPI

````yaml /openapi-v0.1.json post /v0.1/batches/uploads
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/uploads:
    post:
      tags:
        - Batches
      summary: Prepare large batch upload
      description: >-
        Upload up to 100,000 JSONL rows / 100 MiB directly to S3 using the
        returned multipart POST URL and fields, then call createBatchFromUpload.
        Input objects expire after one day; upload credentials expire after 15
        minutes.
      operationId: prepareBatchUpload
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchUploadResponse'
        '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:
    BatchUploadResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
        data:
          $ref: '#/components/schemas/BatchUploadData'
        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
    BatchUploadData:
      type: object
      required:
        - upload_id
        - upload_url
        - method
        - upload_fields
        - file_field
        - instructions
        - expires_in_seconds
        - max_bytes
        - max_rows
      properties:
        upload_id:
          type: string
          format: uuid
          description: >-
            Also the batch ID; use it to check progress after an ambiguous
            launch timeout.
        upload_url:
          type: string
          format: uri
        method:
          type: string
          enum:
            - POST
        upload_fields:
          type: object
          additionalProperties:
            type: string
          description: >-
            Include every value unchanged in the multipart form. Append file
            last; let the HTTP client set the multipart boundary.
        file_field:
          type: string
          enum:
            - file
        instructions:
          type: string
        expires_in_seconds:
          type: integer
          enum:
            - 900
        max_bytes:
          type: integer
          enum:
            - 104857600
        max_rows:
          type: integer
          enum:
            - 100000
    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

````

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