---
title: "Generate Latex Subject"
method: POST
path: "/teacher-exams/{exam_id}/latex"
tags: ["Teacher Exams LaTeX"]
---

# Generate Latex Subject

`POST /teacher-exams/{exam_id}/latex`

Generate a LaTeX document, compiled PDF, or DOCX from exam content.
For structured_corrections, uses template-based approach instead of LLM and applies PDF formatting options.

## Path parameters

- `exam_id` string, required

## Request body

- GenerateLatexOptions
  - `format` string
  - `field` 'structured_exercises' | 'structured_corrections'
  - `include_header` boolean
  - `exam_title` string, nullable

## Response `200`

Successful Response

- object

## 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/d367d251945b?raw)
