---
title: "Create Exercises From Upload"
method: POST
path: "/teacher_exercises/create-from-upload"
tags: ["teacher_exercises"]
---

# Create Exercises From Upload

`POST /teacher_exercises/create-from-upload`

Create teacher exercises directly from an uploaded document: page images
to transcribe, statements already in text (a .tex / .txt / .md the
teacher dropped), or both. The intermediate transcription is only used
server-side for parsing.

## Request body

- CreateExercisesFromUploadRequest
  - `images` string[]
  - `text_content` string, nullable
  - `save_to_library` boolean

## Response `200`

Successful Response

- CreateExercisesFromUploadResponse
  - `status` string, required
  - `message` string, required
  - `exercises` TeacherExerciseResponse[], required
    - `id` string, required
    - `teacher_id` string, required
    - `title` string, nullable, required
    - `content` string, required
    - `solution` string, nullable, required
    - `figure_id` string, nullable
    - `solution_figure_id` string, nullable
    - `figure_content` string, nullable
    - `figure_solution` string, nullable
    - `difficulty` string, nullable, required
    - `themes` string[], required
    - `source` string, required
    - `subject` 'maths' | 'physique-chimie'
    - `grade` 'sixieme' | 'cinquieme' | 'quatrieme' | 'troisieme' | 'seconde' | 'premiere' | 'terminale' | 'prepa', nullable
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `is_private` boolean, required
    - `is_saved` boolean, required
    - `folder_id` string, nullable
    - `likes_count` integer
  - `transcriptions` string[], required
  - `image_urls` string[], required
  - `diagram_image_urls` string[], required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-09** `e75413b9576a` — 2 info
  - added the new optional request property `text_content`
  - the request property `images` became optional
- **2026-09-07** `0ccba2913cca` — 1 breaking, 1 warning
  - removed the required property `exercises/items/school_year` from the response with the `200` status
  - removed the optional property `exercises/items/is_past` from the response with the `200` status
- **2026-09-02** `8d495ed916c6` — 1 info
  - added the new optional request property `save_to_library`

[Change history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/teacher_exercises/create-from-upload/post.md)

---

[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.dev/excellence-ai/apis/excellence-learning/revisions/2a0c1636fd3b?raw)
