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 integerstatus: 0 Open, 1 In Progress, 2 Completed, 3 Failed.
Step 1: Create the assignment
Send the assignment’s name, and your own IDs for the class. You get back theid that every later call uses.
What you get back
What you get back
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 sendisFinal in a second call to start extraction. Wait for the assignment’s status to reach 2, then read the questions.
What you get back
What you get back
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.- Answer key
- Rubric
What you get back
What you get back
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 ownstudentId and the student’s name.
What you get back
What you get back
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 sendisFinal 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.
- Documents
- Audio link
Step 6: Get the score
Wait for the answer sheet’sstatus to reach 2, then read the marks and feedback.
What you get back
What you get back
For written answers, the marks are on For an audio answer, Both examples are trimmed. The response has no obtained total, so add up
answer.marks and the feedback is in answer.feedbacks:answer.text is the transcript, answer.marks stays 0, and the score is in answer.holistic_evaluation:answer.marks, or read holistic_evaluation.marks, yourself.Good to know
Limits
Limits
Daily limits reset shortly after midnight, server time, and every request counts, including rejected ones.
Use webhooks instead of polling
Use webhooks instead of polling
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.Troubleshooting
Troubleshooting
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.Related
Assignment API reference
Every field, response, and error.
What teachers use it for
The classroom problem this solves.