---
title: "Generate Class Remediation"
method: POST
path: "/teacher/assignments/{assignment_id}/generate-class-remediation"
tags: ["teacher_assignments"]
---

# Generate Class Remediation

`POST /teacher/assignments/{assignment_id}/generate-class-remediation`

## 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/teacher/assignments/{assignment_id}/generate-class-remediation`
- Auth: OAuth 2 (password, token URL `api/login`)

Generate a new draft assignment with 5 AI-generated remediation exercises
targeting the most common class-wide mistakes.

The logic lives in `services/class_remediation.py`, shared with the chat
tool; this keeps the historical answers (400 with a French detail when the
devoir has no class or nobody started it, 500 when the generation fails).

## Path parameters

- `assignment_id` string, required

## Request body

- ClassRemediationRequest
  - `class_ids` string[], nullable

## Response `200`

Successful Response

- ClassRemediationResponse
  - `status` string, required
  - `assignment_id` string, required

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