---
title: "Create Course Content From Tex"
method: POST
path: "/admin/holiday-courses/subchapitres/{sub_chapitre_id}/create-course-from-tex"
tags: ["Admin - Holiday Courses"]
---

# Create Course Content From Tex

`POST /admin/holiday-courses/subchapitres/{sub_chapitre_id}/create-course-from-tex`

Create a new course from raw LaTeX content.

This endpoint:
1. Parses LaTeX content into structured CourseUnit objects using AI
2. Creates a Course document with holiday_workbook source type
3. Links the course to the specified HolidayCourseSubChapitre
4. Generates additional QCM/Flashcard units (background task)
5. Generates global revision flashcards (background task)

## Path parameters

- `sub_chapitre_id` string, required — The ID of the holiday course sub-chapitre

## Request body

- CreateCourseFromTexRequest — Request model for creating course content from raw LaTeX
  - `tex_content` string, required
  - `include_qcm_unit` boolean
  - `include_flashcards_unit` boolean

## Response `200`

Successful Response

- CreateCourseFromTexResponse — Response model for course creation from LaTeX
  - `course_id` string, required
  - `status` string, required
  - `message` string, nullable

## 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.dev/excellence-ai/apis/excellence-learning/revisions/a5af9b3b34f7?raw)
