Document reading
Read photos, scans and handwriting into text: verbatim transcripts, a learner's working, or teaching notes.
- Price1 credit (10p) per photo
- Typical time10 s to 2 min
- Scope
learning:write - Runs asA background job
Run document reading in the sandbox
No key and nothing to pay. The sandbox returns a realistic example in a couple of seconds; no AI runs and no data is kept.
- Queued202 and a job id, straight away
- ProcessingPoll, stream or wait for a webhook
- SucceededResult and files on the job
Send up to 20 images (PNG, JPEG or WebP) and/or a PDF document with the pages to read. read_as picks the reading: transcript (every word, mark, tick and table exactly as written, [illegible] where unsure), working (a learner's handwritten working and final answer, never solved or corrected) or notes (teaching material as headed sections, diagrams described). Every page is read as an image, so handwriting on typed pages is kept. A finished job also has reading.txt. Readings are evidence to check against the original, never marks.
Requires learning:write. Costs 1 credit per photo. Send a unique Idempotency-Key; reuse it with the identical body when retrying. Returns 202 with a job: poll GET /jobs/{job_id}, stream GET /jobs/{job_id}/events, or use a signed webhook.
Document reading
POST/v1/documents/read
Scope learning:write
Headers
| Field | Details |
|---|---|
Idempotency-Key | stringRequiredA unique key per new operation; reuse it with the identical body when retrying. |
EduMark-Version | enumAPI version. Defaults to the latest.One of 2026-10-21 |
Request body
| Field | Details |
|---|---|
images | array of FileReference or InlineFilePhotos or scans to read (PNG, JPEG or WebP), in order.Up to 20 items |
file_idimages[].file_id | stringRequiredThe id returned by POST /v1/files, after POST /v1/files/{id}/complete reported ready.When sending FileReferencePattern ^file_[a-f0-9]{32}$ |
filenameimages[].filename | stringRequiredWhen sending InlineFileUp to 200 characters |
base64images[].base64 | stringRequiredWhen sending InlineFileUp to 27,962,028 characters |
mime_typeimages[].mime_type | string, optionalWhen sending InlineFileUp to 150 characters |
document | FileReference or InlineFile, optionalA PDF to read pages from. Say which with pages. |
file_iddocument.file_id | stringRequiredThe id returned by POST /v1/files, after POST /v1/files/{id}/complete reported ready.When sending FileReferencePattern ^file_[a-f0-9]{32}$ |
filenamedocument.filename | stringRequiredWhen sending InlineFileUp to 200 characters |
base64document.base64 | stringRequiredWhen sending InlineFileUp to 27,962,028 characters |
mime_typedocument.mime_type | string, optionalWhen sending InlineFileUp to 150 characters |
pages | array of integer, optionalThe PDF pages to read, numbered from 1, for example [1, 2, 3]. You pay per page you list.1 to 20 items |
read_as | enumtranscript: every word, mark and table exactly as written, handwriting included. working: a learner's handwritten working step by step and their final answer. notes: teaching material as headed sections, with diagrams described.One of transcript, working, notesDefault "transcript" |
question | string, optionalFor working: the question the working answers, so the reading is in context.Up to 4,000 characters |
Responses
| Status | Meaning |
|---|---|
| 202 | Successful Response |
| 400 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 401 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 402 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 403 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 404 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 409 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 410 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 413 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 415 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 422 | Validation Error |
| 429 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
| 503 | Request rejected. Inspect error.code and request_id; failed work is not billed. |
Files and errors
Files on the finished job
reading.txtEverything read, page by page.
Download with GET /v1/jobs/{id}/files/{name}.
Product errors
PAGES_REQUIREDHTTP 422. Say which PDF pages to read with pages, for example [1, 2, 3].TOO_MANY_PAGESHTTP 422. Read up to 20 pages and images per request.PAGE_OUT_OF_RANGEOn the finished job. A listed page does not exist in the PDF. No charge was applied.IMAGE_UNREADABLEOn the finished job. An image could not be decoded.MODEL_RESULT_INVALIDOn the finished job. The generated material did not pass EduMark's checks. No charge was applied.PROCESSING_UNAVAILABLEOn the finished job. Processing could not complete safely. No complete result was issued.