> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Results and the result.json File

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

```json
{
  "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "filename": "doc.pdf",
  "total_pages": 12,
  "failed_pages": [4],
  "pages": [...]
}
```

| Field          | Description                                                                                                                   |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `job_id`       | The job's UUID.                                                                                                               |
| `filename`     | Display name recorded at submission.                                                                                          |
| `total_pages`  | Page count probed from the input document (always `1` for PNG and JPEG inputs).                                               |
| `failed_pages` | Sorted 1-based page numbers that carry an error from any stage. Will be empty when every page succeeded.                      |
| `pages`        | One 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:

```json
{
  "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
}
```

| Field                      | Description                                                                                                                                                                  |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `page_number`              | 1-based page number.                                                                                                                                                         |
| `text`                     | Full 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_layout`              | Ordered list of layout blocks (see below).                                                                                                                                   |
| `text_lines`, `text_words` | Reserved for per-line and per-word detail. Currently always empty.                                                                                                           |
| `error_type`               | `null` on success, otherwise set to the stage that failed (`render`, `layout`, `vlm_all_failed`, `conversion`, or `ocr`).                                                    |
| `error`                    | Human-readable message when `error_type` is set.                                                                                                                             |
| `vlm_failed_blocks`        | Reserved for a count of blocks whose VLM OCR failed. Currently always `null`.                                                                                                |

Each block in `text_layout` carries:

| Field                                                                     | Description                                                                                                                                                                                                   |
| ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `label`                                                                   | Layout class from the detection model, such as `text`, `paragraph_title`, or `table`.                                                                                                                         |
| `type`                                                                    | `text` or `table`.                                                                                                                                                                                            |
| `bbox`                                                                    | `{ "coord": [x, y, w, h] }`, normalized to `[0, 1]` with a top-left origin.                                                                                                                                   |
| `text`                                                                    | Block 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`, `markdown`                                                        | Table 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_order` | Reserved. 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.