Upload exam model answers
Attach answer key files to a model answer sheet, then submit them so the AI can extract model answers and step marking.
isFinal to submit.Rules
- Send exactly one of
documents,fileUrl, orisFinalper request. - Files must be
.pdf,.jpg,.jpeg, or.png, and at most 20 MB each. - Declare each file’s type in its multipart part:
application/pdf,image/jpeg, orimage/png. The API reads the part’sContent-Type, not the file name. Most other values are rejected with400 Invalid file type, but the Word.docxtype is not, so do not send one by accident. - A PDF can have at most 50 pages, and a sheet takes one PDF. You cannot mix a PDF with images.
fileUrlreplaces an upload: a public HTTPS link that the API fetches itself. It rejects the link unless the file starts with%PDF, and allows onefileUrlper sheet.- Send
{"isFinal": true}only after every file is uploaded.
How to know when it’s done
The response has nostatus field of its own. Two things tell you where extraction is:
exam_evaluation_model_answer_extraction. See Async jobs and webhooks.
Next step
Get extracted exam model answers
Authorizations
Access token from Get an access token. A missing, invalid, or expired token returns 403.
Path Parameters
The exam id returned by Create an exam. Write it in lowercase: this path only matches lowercase hexadecimal characters and hyphens.
"d19e6868-98dd-4274-a2a5-4a616dd93ea7"
The model answer sheet id returned by Create an exam model answer sheet.
"7b3f9a10-4c62-4b8e-9c21-8f5a6d2e1b34"
Body
Answer key files. One .pdf of up to 50 pages, or any number of .jpg and .png images. Up to 20 MB per file. Each part's Content-Type decides the file type, so declare application/pdf, image/jpeg, or image/png. No mixing a PDF with images, and one PDF per sheet.
Public HTTPS link to a PDF instead of an upload. The API fetches it and rejects anything that does not start with %PDF.
"https://example.com/papers/science-set-a-key.pdf"
Send true to submit the answer key for extraction. Send it on its own. In a multipart request any value, including false, submits the sheet, so leave the field out until you mean it.
Response
The model answer sheet was updated. With isFinal=true, extraction has started.