---
title: "Upload Pdf"
method: POST
path: "/copy-correction/{session_id}/upload-pdf"
tags: ["Copy Correction"]
---

# Upload Pdf

`POST /copy-correction/{session_id}/upload-pdf`

Upload a PDF or image file and process it in the background.

Streams the file to a temp file (never loads the full file into RAM),
then kicks off a background task that converts pages one-by-one.
The frontend polls GET /{session_id}/pdf-upload-status for progress.

`upload_mode` is per-upload, NOT per-session. A teacher can mix simple
and copies-doubles uploads in the same session — each upload carries its
own mode, and "copie_double" triggers a smart-split that only processes
the pages from THIS batch (the smart-split background task receives the
`start_index` of the first new page).

## Path parameters

- `session_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/c407f3b5a05b/schema)
