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
  • Scopelearning:write
  • Runs asA background job
Try it

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.

  1. Queued202 and a job id, straight away
  2. ProcessingPoll, stream or wait for a webhook
  3. SucceededResult and files on the job
Every AI request runs as a background job, so nothing times out.

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

Document reading: headers
FieldDetails
Idempotency-KeystringRequiredA unique key per new operation; reuse it with the identical body when retrying.
EduMark-VersionenumAPI version. Defaults to the latest.One of 2026-10-21

Request body

Document reading: request body
FieldDetails
imagesarray of FileReference or InlineFilePhotos or scans to read (PNG, JPEG or WebP), in order.Up to 20 items
file_idimages[].file_idstringRequiredThe id returned by POST /v1/files, after POST /v1/files/{id}/complete reported ready.When sending FileReferencePattern ^file_[a-f0-9]{32}$
filenameimages[].filenamestringRequiredWhen sending InlineFileUp to 200 characters
base64images[].base64stringRequiredWhen sending InlineFileUp to 27,962,028 characters
mime_typeimages[].mime_typestring, optionalWhen sending InlineFileUp to 150 characters
documentFileReference or InlineFile, optionalA PDF to read pages from. Say which with pages.
file_iddocument.file_idstringRequiredThe id returned by POST /v1/files, after POST /v1/files/{id}/complete reported ready.When sending FileReferencePattern ^file_[a-f0-9]{32}$
filenamedocument.filenamestringRequiredWhen sending InlineFileUp to 200 characters
base64document.base64stringRequiredWhen sending InlineFileUp to 27,962,028 characters
mime_typedocument.mime_typestring, optionalWhen sending InlineFileUp to 150 characters
pagesarray 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_asenumtranscript: 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"
questionstring, optionalFor working: the question the working answers, so the reading is in context.Up to 4,000 characters

Responses

StatusMeaning
202Successful Response
400Request rejected. Inspect error.code and request_id; failed work is not billed.
401Request rejected. Inspect error.code and request_id; failed work is not billed.
402Request rejected. Inspect error.code and request_id; failed work is not billed.
403Request rejected. Inspect error.code and request_id; failed work is not billed.
404Request rejected. Inspect error.code and request_id; failed work is not billed.
409Request rejected. Inspect error.code and request_id; failed work is not billed.
410Request rejected. Inspect error.code and request_id; failed work is not billed.
413Request rejected. Inspect error.code and request_id; failed work is not billed.
415Request rejected. Inspect error.code and request_id; failed work is not billed.
422Validation Error
429Request rejected. Inspect error.code and request_id; failed work is not billed.
503Request 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.