Skip to navigation

Results and the result.json File

result.json has a small top-level envelope wrapping a list of per-page results:

{
"job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"filename": "doc.pdf",
"total_pages": 12,
"failed_pages": [4],
"pages": [...]
}
FieldDescription
job_idThe job’s UUID.
filenameDisplay name recorded at submission.
total_pagesPage count probed from the input document (always 1 for PNG and JPEG inputs).
failed_pagesSorted 1-based page numbers that carry an error from any stage. Will be empty when every page succeeded.
pagesOne entry per page, sorted by the page_number subkey. Every page from 1 to total_pages appears, including failed pages.

If you pulled the job’s result with ?timings=true, the envelope will also contain a page_timings object with aggregate timing statistics and individual page timing spans. Its shape is the exact same as the page_timings object from the job-specific status endpoint.

Each entry in pages has the following shape:

{
"page_number": 1,
"text": "<HEADER>Patient Name:</HEADER>\n[...]",
"text_layout": [
{
"label": "header",
"type": "text",
"bbox": { "coord": [0.08, 0.12, 0.84, 0.05] },
"text": "<HEADER>Patient Name:</HEADER>"
},
{
"label": "table",
"type": "table",
"bbox": { "coord": [0.08, 0.30, 0.84, 0.22] },
"html": "<table>...</table>",
"markdown": "| Dictating Physician | Document Date |\n|---|---|\n..."
}
],
"text_lines": [],
"text_words": [],
"error_type": null,
"error": null,
"vlm_failed_blocks": null
}
FieldDescription
page_number1-based page number.
textFull page text, with the blocks joined by newlines. null on failure, or an empty string when error_type is vlm_all_failed. Table blocks render as markdown by default.
text_layoutOrdered list of layout blocks (see below).
text_lines, text_wordsReserved for per-line and per-word detail. Currently always empty.
error_typenull on success, otherwise set to the stage that failed (render, layout, vlm_all_failed, conversion, or ocr).
errorHuman-readable message when error_type is set.
vlm_failed_blocksReserved for a count of blocks whose VLM OCR failed. Currently always null.

Each block in text_layout carries:

FieldDescription
labelLayout class from the detection model, such as text, paragraph_title, or table.
typetext or table.
bbox{ "coord": [x, y, w, h] }, normalized to [0, 1] with a top-left origin.
textBlock text, set on text blocks and null on table blocks. Text in header and footer blocks is wrapped in <HEADER> and <FOOTER> tags, and paragraph_title text is uppercased and ends with a colon.
html, markdownTable renderings, set on table blocks and null on text blocks. markdown is null unless the server is configured to convert to markdown.
lines, words, cell_boxes, page_reading_order, doc_reading_orderReserved. Currently always empty or null.

A page whose error_type is render or ocr carries a minimal entry of page_number, text, text_layout, error_type, and error. You should guard the other fields with dict.get() or similarly escaped acessors when processing.