Skip to main content
Exam Evaluation reads an exam paper, reads the answer key, then marks each student’s handwritten answer sheet against it and explains every mark it takes off. This guide is for developers. For a non-technical overview, see Exam Evaluation features. The flow has eight steps. Three of them upload something, and each one follows the same four moves: create it, upload files, submit with isFinal, wait for the AI.
Steps 1, 3, and 5 start background AI jobs. Exams report a status, but model answer sheets and answer sheets do not, so you wait on the endpoint that returns the result: it answers 400 while the job runs and 200 when it is ready. The wait_for helper below does this for you.

Set up

You need an access token. If you don’t have one, follow the Quickstart.
Every path needs its trailing slash. Without it, the API redirects the request, and a POST or PATCH arrives with an empty body.

Step 1: Create the exam and upload the question paper

Create the exam, upload the paper, then submit it with isFinal. Send one PDF of up to 50 pages, or any number of .jpg and .png images, but never a PDF and images together.
grade, subject, and examType are integer codes. Get them from Get exam evaluation constants. They don’t change, so you can store them.
Send documents, fileUrl, or isFinal, never two in one request. In a multipart request, any value of isFinal counts as sending it, including isFinal=false.
The API works out a file’s type from the Content-Type of its multipart part, not from the file name. Declare it as the samples do, or you get 400 Invalid file type. curl -F fills it in for you, but requests and FormData do not.
Each file’s status is 0 Open, 1 In Progress, 2 Completed, or 3 Failed. The exam’s own status uses the same values, and you can read it with Get an exam.

Step 2: Get the extracted questions

Wait for the questions, then show them to a teacher. Until extraction finishes, this call returns 400 Exam is not processed yet.
Questions sit three levels deep: sections, then question groups, then the questions a student answers.
maxQuestionAttempt says how many items below count toward the score. Fix anything wrong now with Edit exam questions, answers, or marks: those edits lock as soon as the first answer sheet is submitted.

Step 3: Upload the model answers

Create the model answer sheet, upload the answer key, then submit it. The same file rules apply.
An exam has one model answer sheet. Creating it twice returns the same sheet, so the call is safe to repeat.

Step 4: Check the model answers

Wait for the answer key, then show it to a teacher. Every question now carries a modelAnswer and its step marking.
The same paper as step 2, with a modelAnswer on every question:
stepMarking splits a question’s marks across the steps of its answer, and that is what the AI grades against. When the marksplit values don’t add up to marks, isModelAnswerMarkMismatch is true. Fix it before you upload any answer sheet.

Step 5: Upload a student’s answer sheet

Create an answer sheet for one student, upload the pages in order, then submit it. Repeat for every student.
Want students to upload their own sheets? Create an embeddable UI link instead. One call creates the answer sheet and a ready-made page for uploading and reading the evaluation. The new sheet’s ID is the last segment of the link.
Every uploaded file goes through a readability check, and an unreadable page is rejected with 400. Submitting counts against a daily limit per API user and returns 429 once you reach it.

Step 6: Review the scores

Wait for the marks, show them to a teacher, and apply any correction. Nothing here is visible to students yet.
An answer edit that changes text or marks must include updateReason. It comes back as teacherFeedback. Editing questions and model answers is already locked at this point.
Every question now has the model answer, the student’s answer, and why marks were lost.
answerText is No Answer when the student left a question blank, and those answers always score 0. Totals roll up into obtainedMarks on each group, each section, and the exam.

Step 7: Publish the results

Publishing is what makes scores readable. pre-publish releases the provisional result, which is also what lets students raise queries.
Publishing applies to the whole exam, not to one answer sheet. Every student’s score becomes readable at once, so review them all first.
When queries are settled, publish again with {"entity": "final-publish"} and read Get final exam results. That response has the same body, so it includes every mark changed since.
provisionalPublishedDate is UTC, written as YYYY-MM-DD HH:MM:SS.

Step 8: Handle student queries (optional)

A student who disagrees with a deduction raises a query against it. That sends the answer back to the AI for a second look.
queryType is 1 Classification, 2 Re-evaluation Request, or 3 Other Concerns.
Every query triggers an AI re-evaluation, whatever the queryType. If the AI agrees with the student, the answer’s marks change and the exam’s totals change with them.
Poll the same GET to pick up the result. The AI’s justification arrives in the query’s responses with createdByRole of AI, and the query’s status becomes 3 Resolved. A teacher can also reply in the thread or close the query.

Good to know

Both daily limits are counted per API user, which is the credential your access token comes from. Separate API users each get their own count.
Register a webhook for each step, then fetch the result when the event arrives. See Async jobs and webhooks.Every payload carries status as Completed or Failed, exam_id, the event’s name and display_name, and the secret_hash you registered. Model answer events add model_answer_sheet_id, and answer sheet events add ans_sheet_id. Nothing else is included, so fetch the result yourself.Only the answer sheet event is retried, once, after 5 seconds if your endpoint doesn’t return 200 or 201. Keep polling as a fallback.

Exam Evaluation API reference

Every field, response, and error.

How the workflow fits a school

The same flow, without the code.

Use cases

Where schools and platforms use exam evaluation.

Embeddable UI

Ready-made screens for uploading and reviewing.