> This page is for version v2026-02-09 (default).
> For other versions, use one of these documentation indexes:
> - v2026-02-09 (default): https://docs.extend.ai/2026-02-09/llms.txt
> - v2025-04-21: https://docs.extend.ai/2025-04-21/llms.txt
> - v2024-12-23: https://docs.extend.ai/2024-12-23/llms.txt

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.extend.ai/llms.txt
> Use this file to discover all available pages before exploring further.
>
> ## API version
> The current API version is `2026-02-09`, served at the site root (no version prefix in URLs).
> If this page URL contains `/2025-04-21/` or `/2024-12-23/`, you are reading an older API version.
> Prefer the current docs at https://docs.extend.ai/llms.txt unless the user explicitly needs that older version.
> Do not treat older-version pages as the source of truth for new integrations.

# Parsing Configuration

> Configure the Parse API with engine selection, chunking strategies, and block options.

The Parse API accepts a `config` object that controls how documents are parsed and processed. Configuration options are organized into several categories:

* **Engine**: The base processor that powers parsing (accuracy vs. speed and cost)
* **Chunking Strategy**: How the document is divided into chunks
* **Block Options**: Fine-grained control over parsing specific layout types
* **Advanced Options**: OCR enhancements and page filtering

For more information on default values and the full schema, see the [Create Parse Run API reference](/api-reference/endpoints/parse/create-parse-run).

> **Prefer a UI?** [Extend Studio](https://dashboard.extend.ai/studio) lets you configure the parser visually and export the config JSON.

---

## Engine

#### `engine`

**Type:** `"parse_performance"` | `"parse_light"` | `"parse_auto"` (default: `"parse_performance"`)

Selects the base processor that powers parsing.

| Processor           | When to use                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parse_performance` | The default, and the best choice when accuracy matters most. Prefer Performance for strong checkbox support, more complex tables, better handwriting handling, and robust multilingual handling.                                                                                                                                                                                        |
| `parse_light`       | Best for high-volume, cost-sensitive ingestion. Faster and lower cost per page, and still handles layout fine — but performs worse on things like lower-quality scans, harder handwriting, larger tables, non-Latin-based languages, and dense checkbox regions.                                                                                                                        |
| `parse_auto`        | Adaptive parsing that classifies difficulty and routes work per page: simple pages parse cheaply with the lightweight pipeline while complex pages get performance-level model treatment. Best for mixed-complexity workloads where you don't want to pick an engine per document. Billed per page by complexity — see [How Credits Work](/general/how-credits-work#base-pricing-auto). |

```json
{
  "config": {
    "engine": "parse_performance"
  }
}
```

#### `engineVersion`

**Type:** `string` (default: `"latest"`)

Pins the run to a specific version of the selected engine. If omitted, the latest stable version is used. Some features require a minimum version — for example, the new layout model's block types require `parse_performance` ≥ `2.0.0`. See the [Parse Performance](/model-versioning/parse/parse-performance), [Parse Light](/model-versioning/parse/parse-light), and [Parse Auto](/model-versioning/parse/parse-auto) version pages for the changelogs.

```json
{
  "config": {
    "engine": "parse_performance",
    "engineVersion": "2.0.0"
  }
}
```

---

## Chunking strategy

#### `chunkingStrategy.type`

**Type:** `"page"` | `"section"` | `"document"`

Determines the granularity of document chunking.

**`"page"`** — Creates a separate chunk for each page of the document.

**`"section"`** — Chunks the document into logical sections based on markdown structure (headings, subheadings). The parser ensures logical groups of content are preserved by never breaking markdown elements across chunks. This is ideal for RAG systems where each chunk should be a complete semantic unit.

**`"document"`** — Treats the entire document as a single chunk. Use this for small documents or when you have custom downstream chunking requirements.

```json
{
  "config": {
    "chunkingStrategy": {
      "type": "section"
    }
  }
}
```

#### `chunkingStrategy.options.minCharacters`

**Type:** `number`

The minimum number of characters per chunk. Small sections may be combined to meet this minimum.

#### `chunkingStrategy.options.maxCharacters`

**Type:** `number`

The maximum number of characters per chunk. Long sections will be split at natural boundaries when possible.

```json
{
  "config": {
    "chunkingStrategy": {
      "type": "section",
      "options": {
        "minCharacters": 500,
        "maxCharacters": 2000
      }
    }
  }
}
```

---

## Block options

Fine-grained control over how specific content types are detected and formatted.

### Figures

#### `blockOptions.figures.enabled`

**Type:** `boolean`

Enables or disables figure detection and parsing. When enabled, the visual languages models will do additional processing, classification and summarization of images, charts, diagrams, and more to analyze and extract content from each figure. \

**Note**: This adds processing latency, especially for documents with many figures. Disable for fastest processing.

#### `blockOptions.figures.figureImageClippingEnabled`

**Type:** `boolean`

When enabled, extracts figure images from the document and uploads them to blob storage, providing presigned URLs in the output. Each figure is cropped from the page and saved as a PNG.

#### `blockOptions.figures.advancedChartExtractionEnabled`

**Type:** `boolean`

When enabled, runs a specialized vision model on any figure classified as a `chart` and converts it into a structured data table. The figure block's `content` is replaced with the extracted table (formatted according to `blockOptions.tables.targetFormat`), making chart values available to downstream LLMs and extraction pipelines.

Requires `blockOptions.figures.enabled: true` (chart classification happens during figure parsing).

**Note:** Requires `engine: "parse_performance"` with `engineVersion >= "2.0.0"`. Adds processing latency proportional to the number of charts in the document.

#### `blockOptions.figures.customInstructions`

**Type:** `string` (max 2,000 characters)

Custom instructions injected into the vision model prompt that analyzes and summarizes each figure. Use this to steer figure descriptions toward what matters for your use case — for example, domain-specific terminology, details to always capture from diagrams, or how to describe particular image types.

Requires `blockOptions.figures.enabled: true` (the instructions are applied during figure parsing).

**Note:** Requires `parse_performance` with `engineVersion >= "2.0.0"` or `parse_light` with `engineVersion >= "1.0.0"`.

```json
{
  "config": {
    "blockOptions": {
      "figures": {
        "enabled": true,
        "figureImageClippingEnabled": true,
        "advancedChartExtractionEnabled": true,
        "customInstructions": "Describe all medical imaging figures using radiology terminology. Always note any visible measurement scales or annotations."
      }
    }
  }
}
```

### Tables

#### `blockOptions.tables.targetFormat`

**Type:** `"markdown"` | `"html"` — defaults to `"html"`.

Controls the output format for tables.

* **markdown**: Human-readable pipe syntax, works well with LLMs
* **html**: Preserves complex table structure (merged cells, rowspan, colspan)

#### `blockOptions.tables.tableHeaderContinuationEnabled`

**Type:** `boolean`

When enabled, automatically propagates table headers across page breaks. Useful for long tables spanning multiple pages where headers are only present on the first page.

#### `blockOptions.tables.cellBlocksEnabled`

**Type:** `boolean`

When enabled, each `table` block in the response includes a `children` array containing per-cell `table_cell` / `table_head` blocks, with `rowIndex`, `columnIndex`, content, and bounding boxes. Useful for building cell-level overlays, targeted highlighting, or custom downstream parsing of table contents.

**Note:** Only supported on `engine: "parse_performance"` with `engineVersion: "1.0.1"`. Cell blocks are **not currently supported** on `parse_performance` `2.0.0` — the table block is still detected and returned, but `children` comes back empty even with this flag enabled. If you need cell-level bounding boxes today, pin to `engineVersion: "1.0.1"`; otherwise consider `advancedOptions.returnOcr.words` below for word-level bounding boxes, which work on both engine versions.

```json
{
  "config": {
    "engine": "parse_performance",
    "engineVersion": "1.0.1",
    "blockOptions": {
      "tables": {
        "targetFormat": "html",
        "tableHeaderContinuationEnabled": true,
        "cellBlocksEnabled": true
      }
    }
  }
}
```

### Text

#### `blockOptions.text.signatureDetectionEnabled`

**Type:** `boolean`

Enables advanced signature detection. When enabled, identifies handwritten signatures, initials, and signature blocks in the document.

#### `blockOptions.text.agentic.enabled`

**Type:** `boolean`

Enables OCR corrections using vision language models to review and correct low OCR confidence and difficult to parse handwriting. The system automatically identifies text regions with low OCR confidence and applies VLM-based corrections.

When to enable:

* Handwritten documents or forms
* Poor quality scans
* Historical documents or faded text
* Mixed print and handwritten content

**Note**: Increases latency, especially when every page is scanned.

```json
{
  "config": {
    "blockOptions": {
      "text": {
        "signatureDetectionEnabled": true,
        "agentic": {
          "enabled": true
        }
      }
    }
  }
}
```

### Formulas

#### `blockOptions.formulas.enabled`

**Type:** `boolean`

Enables formula detection and parsing. When enabled, mathematical formulas and equations are detected as `formula` blocks, with their LaTeX representations included in the block details. When disabled, formulas will be detected as `text` blocks and may not be accurately parsed.

**Note**: Formula parsing is available on `parse_performance` v2.0.0 and `parse_light` v1.0.0.

```json
{
  "config": {
    "blockOptions": {
      "formulas": {
        "enabled": true
      }
    }
  }
}
```

### Forms (key-value)

The new layout model in `parse_performance` v2.0.0 detects multi-column form regions as dedicated `key_value` blocks. Each form region is then enriched by a VLM into properly ordered markdown of label/value pairs (including checkboxes and signatures).

#### `blockOptions.keyValue.blankFieldFormattingEnabled`

**Type:** `boolean`

When enabled, empty form fields are explicitly annotated with a `<blank />` marker in the formatted form content, making it easy to distinguish "field present but unfilled" from "field not present" in downstream extraction or RAG pipelines.

For example, an unchecked field in the source document would render as `Date of Birth: <blank />` instead of `Date of Birth:`.

**Note:** Requires `engine: "parse_performance"` with `engineVersion >= "2.0.0"`.

```json
{
  "config": {
    "blockOptions": {
      "keyValue": {
        "blankFieldFormattingEnabled": true
      }
    }
  }
}
```

### Barcodes

Barcodes and QR codes are detected as dedicated `barcode` blocks by the new layout model in `parse_performance` v2.0.0.

#### `blockOptions.barcodes.readingEnabled`

**Type:** `boolean`

When enabled, decodes detected barcodes and QR codes into their underlying values (e.g. URLs, invoice codes, tracking numbers). The decoded value and barcode format (e.g. `"QRCode"`, `"Code128"`, `"DataMatrix"`, `"EAN13"`) are returned in the block's `details.decodedValue` and `details.format` fields, and the `content` field contains the decoded value.

#### `blockOptions.barcodes.imageClippingEnabled`

**Type:** `boolean`

When enabled, crops each barcode region from the page, uploads it to blob storage, and returns a presigned URL in `details.imageUrl`. Useful for displaying or re-processing the original barcode image.

**Note:** Both options require `engine: "parse_performance"` with `engineVersion >= "2.0.0"`.

```json
{
  "config": {
    "blockOptions": {
      "barcodes": {
        "readingEnabled": true,
        "imageClippingEnabled": true
      }
    }
  }
}
```

---

## Advanced options

#### `advancedOptions.pageRotationEnabled`

**Type:** `boolean`

Enables automatic page rotation detection and correction. The system detects if pages are rotated and automatically rotates them to the correct orientation before parsing.

```json
{
  "config": {
    "advancedOptions": {
      "pageRotationEnabled": true
    }
  }
}
```

#### `advancedOptions.pageRanges`

**Type:** `Array<{ start: number, end: number }>`

Specifies which pages of the document to process. Page numbers are 1-based and ranges are inclusive. Ranges can overlap and be in any order—the system automatically merges and sorts them.

```json
{
  "config": {
    "advancedOptions": {
      "pageRanges": [
        { "start": 1, "end": 3 },
        { "start": 10, "end": 10 }
      ]
    }
  }
}
```

* 1-based, inclusive page numbers
* Ranges can overlap or arrive out of order; the platform merges and sorts them automatically
* Omit the field or pass `[]` to process the full document (subject to global limits)
* You are only billed for pages actually processed

### Excel

#### `advancedOptions.excelParsingMode`

**Type:** `"basic"` | `"advanced"`

Controls how Excel files are parsed.

* **basic**: Fast, deterministic parsing.
* **advanced**: Enable layout block detection for complex spreadsheets.

For `.xls` files, `basic` mode is always used.

```json
{
  "config": {
    "advancedOptions": {
      "excelParsingMode": "advanced"
    }
  }
}
```

#### `advancedOptions.excelSkipHiddenContent`

**Type:** `boolean`

When enabled, hidden rows, columns, and sheets are excluded from parsed Excel output.

```json
{
  "config": {
    "advancedOptions": {
      "excelSkipHiddenContent": true
    }
  }
}
```

#### `advancedOptions.excelUseRawCellValues`

**Type:** `boolean`

When enabled, returns raw calculated cell values instead of locale-formatted values. For example, a date stored as `45672` would be returned as `45672` instead of `01/15/2025`. Useful when downstream processing needs the underlying numeric or unformatted data.

```json
{
  "config": {
    "advancedOptions": {
      "excelUseRawCellValues": true
    }
  }
}
```

#### `advancedOptions.excelSkipCalculation`

**Type:** `boolean` (default: `true`)

When enabled, skips formula recalculation when opening the workbook. This significantly improves parsing speed for formula-heavy spreadsheets. Disable if you need formulas to be recalculated before parsing (e.g., when cell values depend on volatile functions like `NOW()` or `TODAY()`).

```json
{
  "config": {
    "advancedOptions": {
      "excelSkipCalculation": false
    }
  }
}
```

#### `advancedOptions.excelIncludeCellMetadata`

**Type:** `boolean`

When enabled, table cell blocks include their source spreadsheet coordinate in `details.cellReference` (for example, `"B2"`, or `"A1:C1"` for a merged cell). Formula cells also include `details.formula` with a leading `=`. Heading or text blocks derived from spreadsheet cells can include a source range in `details.cellReference`.

For HTML table output, the same provenance is also preserved as `data-cell` and `data-formula` attributes. Markdown output does not include HTML attributes, but the structured block details are still available.

**Note:** Requires `advancedOptions.excelParsingMode: "advanced"`.

```json
{
  "config": {
    "advancedOptions": {
      "excelParsingMode": "advanced",
      "excelIncludeCellMetadata": true
    }
  }
}
```

#### `advancedOptions.excelIncludeCellFormatting`

**Type:** `boolean`

When enabled, table cell blocks include structured formatting (`bold`, `italic`, `fontColor`, `backgroundColor`) in `details.formatting` when the source cell has formatting. For HTML table output, the cell's inline style is also preserved, including colors, bold or italic text, and borders.

Useful when spreadsheet formatting carries meaning for downstream extraction, review, or display.

**Note:** Requires `advancedOptions.excelParsingMode: "advanced"`. Can increase response size for heavily formatted workbooks.

```json
{
  "config": {
    "advancedOptions": {
      "excelParsingMode": "advanced",
      "excelIncludeCellFormatting": true
    }
  }
}
```

#### `advancedOptions.returnOcr`

Options for returning raw OCR data in the response.

#### `advancedOptions.returnOcr.words`

**Type:** `boolean`

When enabled, returns word-level bounding boxes in the response under `output.ocr.words`. Each word includes `content`, `boundingBox`, `confidence` (0-1), `pageNumber`, and `blockId`. Coordinates are in points (1/72 inch) from the top-left corner.

Useful for building document viewers with precise text selection, word-level search highlighting, or OCR quality assessment.

`blockId` is the `id` of the [block](/parsing/response-format#understanding-blocks) the word belongs to — this is how you map words back to blocks. It's useful because `words` are returned in raster/line order across the full page width, which doesn't match block reading order for multi-column layouts, so `blockId` lets you group or reorder words to match block layout instead.

**Note:** This meaningfully impacts the response size. Consider using the signed URL return format (`responseType=url`) for large documents.

```json
{
  "config": {
    "advancedOptions": {
      "returnOcr": {
        "words": true
      }
    }
  }
}
```

**Response structure:**

```json
{
  "object": "parse_run",
  "output": {
    "chunks": [...],
    "ocr": {
      "words": [
        {
          "content": "Invoice",
          "boundingBox": {
            "left": 72.5,
            "top": 50.2,
            "right": 120.3,
            "bottom": 65.8
          },
          "confidence": 0.99,
          "pageNumber": 1,
          "blockId": "block_1_kSCczH"
        }
      ]
    }
  }
}
```

#### `advancedOptions.alwaysConvertToPdf`

**Type:** `boolean`

When enabled, supported file types (images, Word documents, PowerPoint, Excel, HTML) are converted to PDF before parsing. This can improve parsing quality for some file types and ensures spatial output with bounding boxes.

```json
{
  "config": {
    "advancedOptions": {
      "alwaysConvertToPdf": true
    }
  }
}
```

#### `advancedOptions.formattingDetection`

**Type:** `Array<{ type: "change_tracking" }>`

Enables detection of tracked changes (insertions, deletions, substitutions) indicated by strikethroughs, colored text, or underlines in the source document. Detected changes are annotated inline in the `content` field of applicable blocks (`text`, `heading`, `section_heading`, `header`, `footer`).

Changes are represented using semantic HTML elements ([`<ins>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins) for insertions and [`<del>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del) for deletions) grouped inside a `<change>` wrapper. We use `<ins>`/`<del>` rather than `<s>` because they carry explicit change semantics, and the `<change>` wrapper makes it easy to identify substitutions (a `<del>` paired with an `<ins>`).

For example: `The total is <change><del>$500.00</del><ins>$450.00</ins></change>.`

**Note:** Requires `engine: "parse_performance"` with `engineVersion >= "2.0.0"`. This feature is new. If you have feedback on the output format or edge cases, drop us a note in Slack or email [support@extend.app](mailto:support@extend.app).

```json
{
  "config": {
    "engine": "parse_performance",
    "engineVersion": "2.0.0",
    "advancedOptions": {
      "formattingDetection": [{ "type": "change_tracking" }]
    }
  }
}
```

---

## Response type

You can specify the response type in the `responseType` query parameter for the [Create Parse Run](/api-reference/endpoints/parse/create-parse-run) and [Get Parse Run](/api-reference/endpoints/parse/get-parse-run) endpoints.

* `json` returns parsed outputs directly in the response body.
* `url` returns a presigned URL to the parsed content in `outputUrl`.

Use `url` for large documents to reduce response payload size, especially when `returnOcr.words` is enabled.