---
title: "Replace Exercise Solution From Photo"
method: PUT
path: "/teacher-exams/{exam_id}/subjects/exercises/{exercise_id}/solution-from-photo"
tags: ["Teacher Exams Subjects"]
---

# Replace Exercise Solution From Photo

`PUT /teacher-exams/{exam_id}/subjects/exercises/{exercise_id}/solution-from-photo`

## 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-exams/{exam_id}/subjects/exercises/{exercise_id}/solution-from-photo`
- Auth: OAuth 2
  - Password
  - Token URL: `api/login`

« Importer mon corrigé » on one exercise (EXC-1837): the teacher's pages,
already transcribed by the client, replace that exercise's corrigé as a
new version. Figures printed on the pages are cropped inline, as in the
library's edit-photo; none is redrawn (EXC-1408).

## Path parameters

- `exam_id` string, required
- `exercise_id` integer, required

## Request body

- ExerciseSolutionFromPhotoRequest
  - `transcribed_text` string, required
  - `diagram_image_urls` string[]

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

> 106 revisions in range; 1 not diffed.

- **2026-11-05** `5b14ec3a9a04`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/teacher-exams/:exam_id/subjects/exercises/:exercise_id/solution-from-photo/put.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/de6afcc9656f?raw)
