---
title: "Upload Batch"
method: POST
path: "/api/batch/upload"
tags: ["Batch Processing"]
---

# Upload Batch

`POST /api/batch/upload`

Upload multiple files as a batch for processing.
Supports both authenticated users and guest mode (1 file, 46 pages max).
Files are uploaded to S3 and batch records created in database.
Processing starts automatically in background.

Args:
    files: List of files to upload (images, PDFs)
    batch_name: Optional name for the batch
    guest_session_id: Guest session ID (required if not authenticated)
    current_user: Authenticated user (optional for guest mode)
    s3_storage: S3 storage instance

Returns:
    BatchUploadResponse with batch_id and document details

## Response `200`

Successful Response

- BatchUploadResponse — Response model for batch upload
  - `batch_id` string, required
  - `document_count` integer, required
  - `documents` object[], required
  - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/qomplement/apis/fastapi.md) · [All operations](https://skmtc.net/qomplement/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qomplement/fastapi/versions/b6c76b02a94a/schema)
