Question Papers

Start a question paper upload

Step 1 of 2. Returns presigned URLs to upload your PDFs to. No question paper is created and nothing is charged until you confirm.

Flow

  1. Call this endpoint.
  2. PUT each PDF to the URL(s) returned, sending Content-Type: application/pdf.
  3. Call POST /v1/question-papers/confirm-upload with the upload_ref.
  4. Poll GET /v1/question-papers/{id} until the status is GENERATED.

model_answer — where the answers come from. Optional, defaults to auto. Exactly one of:

ValueMeaningPDFs to upload
autoYou are not supplying answers; they are worked out for you.1
in_question_paperThe answer key is inside the question paper PDF, e.g. an answer section at the end.1
separate_pdfThe answer key is its own file. A second upload URL is returned and must also be uploaded to.2

With in_question_paper or separate_pdf your answers are used verbatim and are never overwritten. A separate marking-scheme PDF is not supported yet — marks come from the answer key when you supply one.

URLs expire 10 minutes after issue; if that passes, just call this again.

post/v1/question-papers/initiate-upload

Request

  • Base URL: https://api.acadine.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.acadine.ai/v1/question-papers/initiate-upload
  • Auth: API key in header X-API-Key

Request body

course_idstring required

From GET /v1/courses.

subject_idstring required

Must belong to course_id — see GET /v1/courses/{course_id}/subjects. A subject from a different course returns 404.

model_answer'auto' | 'in_question_paper' | 'separate_pdf'

Where the answers to the questions come from. One of three values:

  • auto — you are not supplying answers. Answers and solutions are worked out for you. Only the question paper PDF is uploaded.
  • in_question_paper — the answer key is inside the question paper PDF itself, for example an answer section at the end. Still only one PDF to upload.
  • separate_pdf — the answer key is its own file. initiate-upload returns a second URL which must also be uploaded to before you confirm.

With in_question_paper or separate_pdf your answers are used verbatim and are never overwritten. A separate marking-scheme PDF is not supported yet: marks are read from the answer key when you supply one, and worked out otherwise.

Example request

{
  "course_id": "ORG_CRS_2msnplIgOEXImjfvuihUqhIqNJO",
  "model_answer": "auto",
  "subject_id": "ORG_SUB_2msnplIgOEXImjfvuihUqhIqNJO"
}

Response

Successful Response

upload_refstring required

Pass this back to POST /v1/question-papers/confirm-upload.

question_paper_upload_urlstring required

PUT the question paper PDF here. Send Content-Type: application/pdf — the header is part of the signature and the upload is rejected without it.

model_answer_upload_urlstring nullable

PUT the answer key PDF here, same rules as above. Present only when model_answer is separate_pdf; null otherwise.

expires_atstring date-time required

Every URL above stops working at this time (10 minutes from issue). If it passes, call initiate-upload again for fresh URLs.

Example response

{
  "upload_ref": "QPU_2msnplIgOEXImjfvuihUqhIqNJO"
}

Changes

No recorded changes to this operation across all 1 revision of this API.