POST - Model Answer
The API is used to create a model answer sheet for an exam. This API initializes a placeholder for model answers, allowing you to later add documents (e.g., PDFs or images) associated with the model answers. This API is used to upload a model answer sheet for a specific exam. A one-to-one mapping exists between an exam and its model answer sheet, meaning that each exam can have only one model answer sheet associated with it.
Scenarios:
- Initializing a Model Answer Sheet for an Exam:
- A teacher uses this API to prepare a model answer sheet by creating a placeholder for it.
- Outcome:
- The response confirms that a model answer sheet is successfully initialized for the exam.
- The teacher can subsequently upload documents, such as PDFs or JPEGs, representing the model answers using the PATCH Model Answer Sheet API.
POST
Create model answer for an exam
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
The body is of type object.
Previous
PATCH - Model AnswerThe API allows updating an existing model answer sheet for an exam. This API is used to:
- Add or replace associated documents for the model answer sheet.
- Update the **isFinal** status of the model answer sheet..
**Key Notes:**
- Only one type of document (**pdf** and **jpeg**) can be uploaded for an exam
- For jpeg files, multiple images can be uploaded sequentially, one at a time.
- You can supply a PDF using **`fileUrl`** instead of uploading via `documents`.
- **`fileUrl`** must be a **public** HTTPS URL, and the URL path must end with **`.pdf`**.
- Use only one of **`documents`**, **`fileUrl`**, or **`isFinal`** in a single request (do not combine them).
**Scenarios:**
1. **Finalizing the Model Answer Sheet and Triggering AI Extraction:**
- Teachers finalize the model answer sheet by setting `isFinal` to `true` in the PATCH API request.
- **Outcome:**
- AI extracts structured data such as model answers, step-wise marking schemes, and instructions, readying them for evaluation workflows.
2. **Sequential Upload of JPEG Documents:**
- For handwritten model answer sheets, teachers upload JPEG images one at a time via the API.
- After uploading all images, `isFinal` is set to `true` to initiate AI extraction.
- **Outcome:**
- AI processes the images, extracting structured content for evaluation.
**Example Workflow:**
1. The teacher uploads a model answer document (PDF or JPEG) via this API.
2. Calls the API with `{ "isFinal": true }` to trigger AI extraction.
3. The extracted content is reviewed and used for grading purposes.
<Danger> If both `documents` and `isFinal` are provided in the same request, a validation error is returned. Use either `documents` to upload, or `isFinal` to trigger extraction — **not both together**. </Danger>
Next
Create model answer for an exam