---
title: "Generate Exam Feedback"
method: POST
path: "/student-exams/{exam_id}/generate-feedback"
tags: ["student-exams"]
---

# Generate Exam Feedback

`POST /student-exams/{exam_id}/generate-feedback`

## Request

- Base URL: `https://api.excellence-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.excellence-ai.com/student-exams/{exam_id}/generate-feedback`
- Auth: OAuth 2 (password, token URL `api/login`)

Generate feedback and performance metrics for the student's work using LLM.
Uses structured exercises and corrections when available, falls back to unstructured content.

## Path parameters

- `exam_id` string, required

## Response `200`

Successful Response

- GenerateFeedbackResponse
  - `status` string, required
  - `exam` StudentExam, required: A model for storing an exam that the student creates and works on themselves. This is distinct from the teacher's exam model.
    - `_id` string
    - `user_id` string, required
    - `exam_title` string, required
    - `time_limit` string, required
    - `exam_subject_images` string[]
    - `exam_subject_transcribed` string
    - `exam_started_at` string, date-time, nullable
    - `exam_finished_at` string, date-time, nullable
    - `time_spent_seconds` integer, nullable
    - `student_work_images` string[]
    - `student_work_diagrams` string[]
    - `student_work_transcribed` string
    - `correction_transcribed` string
    - `performance` StudentExamPerformance
      - `total_questions` integer, required
      - `correct` integer, required
      - `partial` integer, required
      - `wrong` integer, required
    - `feedback` string, nullable
    - `structured_exercises` ExamExercise[]
      - `id` integer, required
      - `title` string, required
      - `content` string, required
      - `solution` string, nullable
      - `points` number
      - `figure_id` string, nullable
      - `solution_figure_id` string, nullable
      - `figure_content` string, nullable
      - `figure_solution` string, nullable
      - `preamble` string, nullable
      - `estimated_minutes` integer, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time, nullable
    - `is_finished` boolean

## Other responses

- `422`: Validation Error

## Changes

> 55 revisions in range; 1 not diffed.

- **2026-09-15** `2a0c1636fd3b`: 1 info
  - added the optional property `exam/structured_exercises/items/estimated_minutes` to the response with the `200` status
- **2026-09-09** `a5af9b3b34f7`: 1 info
  - added the optional property `exam/structured_exercises/items/preamble` to the response with the `200` status

[Operation history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/student-exams/:exam_id/generate-feedback/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/379e4a57dee8?raw)
