Skip to main content
Assignment Evaluation reads an assignment’s question paper, learns the teacher’s answer key or rubric, then marks each student’s answer and writes feedback. Students can answer on paper, which you upload as a PDF or photos, or out loud, which you send as a link to an MP3. This guide is for developers. For a non-technical overview, see Assignment Evaluation features and the workflow.
Steps 2, 3, and 5 start a background job. Each one takes two calls: first the upload, then a separate call with isFinal set to the text true. Wait until status is 2 (Completed) before the next step. 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. Progress is reported as an integer status: 0 Open, 1 In Progress, 2 Completed, 3 Failed.
Every path ends with a slash. Without it, the API redirects the request and a POST or PATCH loses its body.

Step 1: Create the assignment

Send the assignment’s name, and your own IDs for the class. You get back the id that every later call uses.
grade is passed to the AI as the student level, so send it when you know it.

Step 2: Upload the question paper

Upload the paper, then send isFinal in a second call to start extraction. Wait for the assignment’s status to reach 2, then read the questions.
Photos work too: send several documents parts with image/jpeg or image/png, in one call or across several. One PDF per assignment, and never a PDF and photos together.
A parentQuestions entry is a group. Shared material, such as a passage, sits in its text, and the questions a student answers sit in questions.

Step 3: Add the answer key or a rubric

Create the model answer sheet, then give the AI something to mark against. Use the teacher’s answer key for questions with a right answer, and a rubric for open-ended work. Audio answers are always scored against a rubric.
Send only one of documents, rubricId, or isFinal per call. Two together return 400. Send isFinal as the text true, not as a JSON boolean.
Once status is 2, Get extracted assignment model answers shows the model answer and step-wise marks for every question.

Step 4: Create an answer sheet for the student

One answer sheet holds one student’s answer. Send your own studentId and the student’s name.
You can also send batchId, sessionId, and teacherId. CrazyGoldFish stores them and returns them unchanged, and studentId and teacherId are filters on List assignment answer sheets.

Step 5: Submit the student’s answer

Send the answer, then send isFinal in a second call to start grading. Use documents for written work and a link for a spoken answer. One answer sheet takes one kind of answer, so never mix them.
A PDF works the same way: one PDF per answer sheet, up to 50 pages, and never with photos.
Send documents or link first, then isFinal on its own. An answer sent together with isFinal returns 400. Send isFinal as the text true, not as a JSON boolean.

Step 6: Get the score

Wait for the answer sheet’s status to reach 2, then read the marks and feedback.
For written answers, the marks are on answer.marks and the feedback is in answer.feedbacks:
For an audio answer, answer.text is the transcript, answer.marks stays 0, and the score is in answer.holistic_evaluation:
Both examples are trimmed. The response has no obtained total, so add up answer.marks, or read holistic_evaluation.marks, yourself.

Good to know

Daily limits reset shortly after midnight, server time, and every request counts, including rejected ones.
Register a webhook for each step, then fetch the result when the event arrives. See Async jobs and webhooks.Assignment payloads name the event in webhook_name, not name, and carry assignment_id plus model_answer_sheet_id or ans_sheet_id. Check status for Completed or Failed.
Messages arrive as error.message.non_field_errors, or keyed by field name when a field is invalid. See Errors for the full format and a helper that reads any message.

Assignment API reference

Every field, response, and error.

What teachers use it for

The classroom problem this solves.