> 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.

# Cancel Processor Run

POST https://api.extend.ai/processor_runs/{id}/cancel

Cancel a running processor run by its ID. This endpoint allows you to stop a processor run that is currently in progress.

Note: Only processor runs with a status of `"PROCESSING"` can be cancelled. Processor runs that have already completed, failed, or been cancelled cannot be cancelled again.


Reference: https://docs.extend.ai/api-reference/endpoints/legacy/cancel-processor-run

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.extend.ai` (Production, default)
- `https://api.us2.extend.app` (Production US2)
- `https://api.eu1.extend.ai` (Production EU1)

## Request

### Path parameters

- `id` (string, required) — The unique identifier for the processor run to cancel. Example: `"exr_Xj8mK2pL9nR4vT7qY5wZ"`

### Headers

- `x-extend-api-version` ("2026-02-09", optional, default: 2026-02-09) — API version to use for the request. If you're using an SDK, you can ignore this parameter. If you are not using an SDK and do not specify a version, you will either receive a `400 Bad Request` or be set to a previous legacy version. See [API Versioning](https://docs.extend.ai/2026-02-09/api-reference/api-versioning) for more details.
- `x-extend-workspace-id` (string, optional) — The workspace ID to target. **Required** when using an organization-scoped API key; optional for workspace-scoped keys (the key is already tied to a workspace). See [Authentication](https://docs.extend.ai/2026-02-09/api-reference/authentication) for details on API key scopes.

## Response

### 200

Successfully cancelled processor run

- `success` (boolean, required)
- `processorRun` (LegacyProcessorRun, required)

## Errors

### 400 Bad Request Error

Bad Request

- `success` (boolean, optional)
- `error` (string, optional) — Error message

### 401 Unauthorized Error

Unauthorized

- `success` (boolean, optional)
- `error` (string, optional) — Error message

### 404 Not Found Error

Not Found

- `success` (boolean, optional)
- `error` (string, optional) — Error message

## Types

### LegacyProcessorRun

- `object` (string, required) — The type of response. In this case, it will always be `"document_processor_run"`.
- `id` (string, required) — The unique identifier for this processor run. Example: `"exr_Xj8mK2pL9nR4vT7qY5wZ"`
- `processorId` (string, required) — The ID of the processor used for this run. Example: `"ex_Xj8mK2pL9nR4vT7qY5wZ"`
- `processorVersionId` (string, required) — The ID of the specific processor version used.
- `processorName` (string, required) — The name of the processor. Example: `"Invoice Processor"`
- `status` (enum, required) — The status of a processor run: * `"PENDING"` - The processor run has not started yet * `"PROCESSING"` - The processor run is in progress * `"PROCESSED"` - The processor run completed successfully * `"FAILED"` - The processor run failed * `"CANCELLED"` - The processor run was cancelled
  - Allowed values: `PENDING`, `PROCESSING`, `PROCESSED`, `FAILED`, `CANCELLED`
- `output` (LegacyProcessorOutput, required) — The final output, either reviewed or initial. Conforms to the shape of output types and depends on the processor type and configuration shape.
- `reviewed` (boolean, required) — Indicates whether the run has been reviewed.
- `edited` (boolean, required) — Indicates whether the run results have been edited.
- `edits` (map from string to LegacyExtractionOutputEdits, required)
- `type` (enum, required) — The type of processor: * `"CLASSIFY"` - Classifies documents into categories * `"EXTRACT"` - Extracts structured data from documents * `"SPLITTER"` - Splits documents into multiple parts
  - Allowed values: `CLASSIFY`, `EXTRACT`, `SPLITTER`
- `config` (LegacyProcessorRunConfig, required) — The configuration used for this processor run. The type of configuration will match the processor type.
- `files` (list of File, required) — Details of the processed files. If this was a file generated from a splitter processor, this will be the sub file. See the File object for more details.
- `mergedProcessors` (list of LegacyProcessorRunMergedProcessorsItems, required) — An array of processors that were merged to create this output. Will be an empty array unless this output was the result of a MergeExtraction step in a workflow.
- `url` (string, required) — The URL to view the processor run.
- `failureReason` (string, optional) — If the run failed, indicates the reason for failure.
- `failureMessage` (string, optional) — If the run failed, provides a detailed message about the failure.
- `metadata` (map from string to any, optional) — Any metadata that was provided when creating the processor run.
- `initialOutput` (LegacyProcessorOutput, optional) — The initial output from the processor run. The type of output will match the processor type.
- `reviewedOutput` (LegacyProcessorOutput, optional) — The output after review, if any.
- `usage` (LegacyDocumentProcessorRunCredits, optional) — These are usage credits for document processing (extraction, classification, or splitting). File parsing credits are tracked separately and can be retrieved from the [Get File](https://docs.extend.ai/2026-02-09/api-reference/endpoints/file/get-file) endpoint. This field will not be returned for processor runs created before October 7, 2025, or for customers on legacy billing systems. For more details on how credits work, see our [Credits Guide](https://docs.extend.ai/general/how-credits-work).

### LegacyProcessorOutput

The output from a processor run. The type of output will match the processor type.

### LegacyExtractionOutputEdits

A record of edits made to the processor output.

- `originalValue` (any, optional) — The original value before editing.
- `editedValue` (any, optional) — The value after editing.
- `notes` (string, optional) — Any notes added during editing.
- `page` (double, optional) — The page number where the edit was made.
- `fieldType` (string, optional) — The type of the edited field.

### LegacyProcessorRunConfig

The configuration used for this processor run. The type of configuration will match the processor type.

### File

- `object` (enum, required) — The type of object. Will always be `"file"`.
  - Allowed values: `file`
- `id` (string, required) — ID for the file. Example: `"file_xK9mLPqRtN3vS8wF5hB2cQ"`
- `name` (string, required) — The name of the file Example: `"Invoices.pdf"`
- `type` (enum, required, nullable) — The type of the file. **Availability:** Present when the file type could be determined.
  - Allowed values: `PDF`, `CSV`, `IMG`, `TXT`, `DOCX`, `EXCEL`, `XML`, `HTML`
- `presignedUrl` (string, required, nullable) — A presigned URL to download the file. Expires after 15 minutes. **Availability:** Present on `GET /files/{id}`. Not present on `POST /files/upload` or when the file is embedded in other resources (e.g., in run responses).
- `parentFileId` (string, required, nullable) — ID of the parent file. **Availability:** Present for files created via a Splitter in a workflow.
- `metadata` (FileMetadata, required)
- `createdAt` (string, required) — The time (in UTC) at which the object was created. Will follow the RFC 3339 format. Example: `"2024-03-21T16:45:00Z"`
- `updatedAt` (string, required) — The time (in UTC) at which the object was last updated. Will follow the RFC 3339 format. Example: `"2024-03-21T16:45:00Z"`
- `contents` (FileContents, required, nullable, deprecated) — **Deprecated:** Use the `POST /parse_runs` endpoint instead to parse and retrieve file contents. The parse runs endpoint provides more control over parsing configuration and better performance. The parsed content of the file. This field will only contain data after the file has been parsed via a parse run, extract run, classify run, split run, edit run, or workflow run. **Availability:** Only present and populated on `GET /files/{id}` when the file has been previously parsed and the corresponding query parameters are set to true. Will be `null` on `POST /files/upload` and for files that haven't been parsed. The structure varies based on file type.

### LegacyProcessorRunMergedProcessorsItems

- `processorId` (string, required) — The ID of the merged processor. Example: `"ex_Xj8mK2pL9nR4vT7qY5wZ"`
- `processorVersionId` (string, required) — The ID of the specific processor version used.
- `processorName` (string, required) — The name of the merged processor. Example: `"Invoice Line Items Processor"`

### LegacyDocumentProcessorRunCredits

These are usage credits for document processing (extraction, classification, or splitting). File parsing credits are tracked separately and can be retrieved from the [Get File](https://docs.extend.ai/2026-02-09/api-reference/endpoints/file/get-file) endpoint. This field will not be returned for processor runs created before October 7, 2025, or for customers on legacy billing systems. For more details on how credits work, see our [Credits Guide](https://docs.extend.ai/general/how-credits-work).

- `credits` (double, required) — The number of credits consumed specifically for document processing in this processor run. This does not include file parsing credits.

### LegacyClassifierOutput

- `id` (string, required) — The unique identifier for this classification
- `type` (string, required) — The type of classification
- `confidence` (double, required) — A value between 0 and 1 indicating the model's confidence in the classification, where 1 represents maximum confidence
- `insights` (list of Insight, required) — Additional insights about the classification decision

### LegacySplitterOutput

- `splits` (list of LegacySplitterOutputSplitsItems, required)
- `isExternal` (boolean, optional)

### LegacyClassificationConfig

- `type` (enum, required) — The type of configuration. Must be `"CLASSIFY"` for classification processors.
  - Allowed values: `CLASSIFY`
- `classifications` (list of LegacyClassification, required) — Array of possible classifications for the document.
- `baseProcessor` (enum, optional, default: classification_performance) — The base processor to use. For classifiers, this must be either `"classification_performance"` or `"classification_light"`. See [Classification Changelog](https://docs.extend.ai/2026-02-09/model-versioning/classification/classification-performance) for more details.
  - Allowed values: `classification_performance`, `classification_light`
- `baseVersion` (string, optional) — The version of the `"classification_performance"` or `"classification_light"` processor to use. If this is provided, the `baseProcessor` must also be provided. See [Classification Changelog](https://docs.extend.ai/2026-02-09/model-versioning/classification/classification-performance) for more details.
- `classificationRules` (string, optional) — Custom rules to guide the classification process in natural language.
- `advancedOptions` (LegacyClassificationAdvancedOptions, optional) — Advanced configuration options.
- `parser` (ParseConfig, optional) — Configuration options for the parsing process.

### LegacyExtractionConfig

- `type` (enum, required) — The type of configuration. Must be "EXTRACT" for extraction processors.
  - Allowed values: `EXTRACT`
- `baseProcessor` (enum, optional, default: extraction_performance) — The base processor to use. For extractors, this must be `"extraction_performance"`, `"extraction_light"`, or `"extraction_operator"`. See [Extraction Changelog](https://docs.extend.ai/2026-02-09/model-versioning/extraction/extraction-performance) for more details.
  - Allowed values: `extraction_performance`, `extraction_light`, `extraction_operator`
- `baseVersion` (string, optional) — The version of the `"extraction_performance"`, `"extraction_light"`, or `"extraction_operator"` processor to use. If this is provided, the `baseProcessor` must also be provided. See [Extraction Changelog](https://docs.extend.ai/2026-02-09/model-versioning/extraction/extraction-performance) for more details.
- `extractionRules` (string, optional) — Custom rules to guide the extraction process in natural language.
- `schema` (map from string to any, optional) — JSON Schema definition of the data to extract. Either `fields` or `schema` must be provided. See the [JSON Schema guide](https://docs.extend.ai/2026-02-09/extraction/schema) for details and examples of schema configuration.
- `advancedOptions` (LegacyExtractionAdvancedOptions, optional) — Advanced configuration options.
- `parser` (ParseConfig, optional) — Configuration options for the parsing process.
- `fields` (list of LegacyExtractionField, optional, deprecated) — Array of fields to extract from the document. Either `fields` or `schema` must be provided. We recommend using `schema` for new implementations.

### LegacySplitterConfig

- `type` (enum, required) — The type of configuration. Must be "SPLITTER" for splitter processors.
  - Allowed values: `SPLITTER`
- `splitClassifications` (list of LegacyClassification, required) — Array of classifications that define the possible types of document sections.
- `baseProcessor` (enum, optional, default: splitting_performance) — The base processor to use. For splitters, this can currently only be `"splitting_performance"` or `"splitting_light"`. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/model-versioning/splitting/splitting-performance) for more details.
  - Allowed values: `splitting_performance`, `splitting_light`
- `baseVersion` (string, optional) — The version of the `"splitting_performance"` or `"splitting_light"` processor to use. If this is provided, the `baseProcessor` must also be provided. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/model-versioning/splitting/splitting-performance) for more details.
- `splitRules` (string, optional) — Custom rules to guide the document splitting process in natural language.
- `advancedOptions` (LegacySplitterAdvancedOptions, optional) — Advanced configuration options.
- `parser` (ParseConfig, optional) — Configuration options for the parsing process.

### FileMetadata

- `pageCount` (double, optional) — The number of pages in the file. This is only set for PDF/DOCX files.
- `parentSplit` (ParentSplit, optional) — The split metadata details for a derivative file. **Availability:** Only included if this file is a derivative of another file, for instance if it was created via a Splitter in a workflow.

### FileContents

**Deprecated:** Use the `POST /parse_runs` endpoint instead to parse and retrieve file contents. The parse runs endpoint provides more control over parsing configuration and better performance. The parsed content of the file. This field will only contain data after the file has been parsed via a parse run, extract run, classify run, split run, edit run, or workflow run. **Availability:** Only present and populated on `GET /files/{id}` when the file has been previously parsed and the corresponding query parameters are set to true. Will be `null` on `POST /files/upload` and for files that haven't been parsed. The structure varies based on file type.

- `rawText` (string, optional) — The raw text content of the file. Available for all file types when the `rawText` query parameter is set to true. - **PDF/IMG**: Concatenated raw text from all pages - **DOCX**: The document's raw text - **CSV**: Concatenated chunks or CSV text - **EXCEL**: Not included (use `sheets` instead) - **TXT/XML/HTML**: The file's text content
- `pages` (list of FileContentsPagesItems, optional) — Page-level content for document file types. - **PDF/IMG**: Contains `pageNumber`, `pageHeight`, `pageWidth`, and `markdown` (if `markdown` query param is true) - **DOCX**: Contains `pageNumber` and `html` (if `html` query param is true) - **Other file types**: Empty array
- `sections` (list of FileContentsSectionsItems, optional) — Section-level content for documents that support section-based chunking. Available for PDF and IMG file types.
- `sheets` (list of FileContentsSheetsItems, optional) — Sheet-level content for spreadsheet file types. Available for EXCEL files.

### Insight

- `type` (enum, required) — The type of insight. Will always be `"reasoning"` for now.
  - Allowed values: `reasoning`
- `content` (string, required) — The content of the reasoning insight.

### LegacySplitterOutputSplitsItems

- `type` (string, required) — The type of the split document (set in the processor config), corresponds to the classificationId
- `observation` (string, required) — Explanation of the results
- `identifier` (string, required) — Identifier for the split document (e.g. invoice number)
- `startPage` (integer, required) — The start page of the split document
- `endPage` (integer, required) — The end page of the split document
- `classificationId` (string, required) — ID of the classification type (set in the processor config)
- `id` (string, required) — Unique ID for this split
- `fileId` (string, required) — File ID associated with this split
- `name` (string, optional) — Optional name for the split

### LegacyClassification

- `id` (string, required) — Unique identifier for the classification. We recommend lowercase, underscore-separated format.
- `type` (string, required) — Type identifier for the classification.
- `description` (string, required) — A detailed description of the classification.

### LegacyClassificationAdvancedOptions

- `context` (enum, optional, default: default) — The context to use for classification.
  - Allowed values: `default`, `max`
- `advancedMultimodalEnabled` (boolean, optional, default: false) — Enable advanced multimodal processing for better handling of visual elements during classification.
- `pageRanges` (list of PageRangesItems, optional) — Limit processing to the specified page ranges. See [Page Ranges](https://docs.extend.ai/2026-02-09/page-ranges).
- `fixedPageLimit` (integer, optional, deprecated) — Limit processing to a specific number of pages from the beginning of the document. See [Page Ranges](https://docs.extend.ai/2026-02-09/page-ranges).

### ParseConfig

Configuration options for the parsing process. Defaults depend on the selected parser engine and version.

- `target` (enum, optional, default: markdown) — The target format for the parsed content. Supported values: * `markdown`: True markdown with logical reading order (headings, lists, tables, checkboxes). Best default for LLMs/RAG and enables section-based chunking. * `spatial`: Layout/position-preserving text that uses markdown elements for block types but is not strictly markdown due to whitespace/tabs used to maintain placement. Only page-based chunking is supported. Guidance: * Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases * Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs See “Markdown vs Spatial” in the [Parse guide](https://docs.extend.ai/2026-02-09/parsing/configuration#target-format) for details.
  - Allowed values: `markdown`, `spatial`
- `chunkingStrategy` (ParseConfigChunkingStrategy, optional) — Strategy for dividing the document into chunks.
- `engine` (enum, optional, default: parse_performance) — The parsing engine to use. Supported values: * `parse_performance`: Full-featured parsing engine with highest accuracy (default) * `parse_light`: Lightweight parsing engine optimized for high-volume, cost-sensitive ingestion. Uses the new layout model with full layout support and the markdown target at lower cost and latency, but performs worse than `parse_performance` on 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 are parsed with the parse_light model pipeline while complex pages get performance-level model treatment. Billed per page by complexity.
  - Allowed values: `parse_performance`, `parse_light`, `parse_auto`
- `engineVersion` (string, optional, default: latest) — Pin a specific parser engine version for reproducibility. When set to `latest`, the most recent stable version of the selected engine is used.
- `blockOptions` (ParseConfigBlockOptions, optional) — Options for controlling how different block types are processed.
- `advancedOptions` (ParseConfigAdvancedOptions, optional)

### LegacyExtractionAdvancedOptions

- `modelReasoningInsightsEnabled` (boolean, optional) — Whether to enable model reasoning insights.
- `advancedMultimodalEnabled` (boolean, optional) — Whether to enable advanced multimodal features.
- `citationsEnabled` (boolean, optional) — Whether to enable citations in the output.
- `arrayCitationStrategy` (enum, optional) — Granularity for array citations. This requires citationsEnabled=true and a base processor version that supports property-level array citations (extraction_performance ≥ 4.4.0).
  - Allowed values: `item`, `property`
- `reviewAgent` (LegacyExtractionAdvancedOptionsReviewAgent, optional) — Configuration for the review agent that analyzes extraction results. When enabled, each field in the output metadata will include a `reviewAgentScore` (1-5) and may include additional `insights` of type `issue` or `review_summary` to help identify fields that may need manual review. Enabling the review agent incurs additional credits. To learn more, view the [Review Agent Documentation](https://docs.extend.ai/2026-02-09/extraction/review-agent)
- `arrayStrategy` (ArrayStrategy, optional) — Strategy for handling large arrays in documents.
- `chunkingOptions` (LegacyExtractChunkingOptions, optional)
- `excelSheetRanges` (list of ExcelSheetRange, optional) — Ranges of sheet indices to extract from Excel documents.
- `excelSheetSelectionStrategy` (enum, optional) — Strategy for selecting sheets from Excel documents.
  - Allowed values: `intelligent`, `all`, `first`, `last`
- `pageRanges` (list of PageRangesItems, optional) — Limit processing to the specified page ranges. See [Page Ranges](https://docs.extend.ai/2026-02-09/page-ranges).
- `documentKind` (string, optional, deprecated) — DEPRECATED - use extractionRules for all system prompts.
- `keyDefinitions` (string, optional, deprecated) — DEPRECATED - use extractionRules for all system prompts.
- `advancedFigureParsingEnabled` (boolean, optional, deprecated) — Whether to enable advanced figure parsing.
- `fixedPageLimit` (integer, optional, deprecated) — DEPRECATED - See [Page Ranges](https://docs.extend.ai/2026-02-09/page-ranges).

### LegacyExtractionField

- `id` (string, required) — Unique identifier for the field.
- `name` (string, required) — Human-readable name for the field.
- `type` (enum, required) — The type of the field.
  - Allowed values: `string`, `number`, `currency`, `boolean`, `date`, `array`, `enum`, `object`, `signature`
- `description` (string, required) — Detailed description of the field, including expected content and format.
- `schema` (list of LegacyExtractionField, optional) — Required when type is "array" or "object". Contains nested field definitions.
- `enum` (list of Enum, optional) — Required when type is "enum". List of allowed values.

### LegacySplitterAdvancedOptions

- `splitIdentifierRules` (string, optional) — Custom rules for identifying split points.
- `splitExcelDocumentsBySheetEnabled` (boolean, optional, default: false) — For Excel documents, split by worksheet.
- `pageRanges` (list of PageRangesItems, optional) — Limit processing to the specified page ranges. See [Page Ranges](https://docs.extend.ai/2026-02-09/page-ranges).
- `splitMethod` (enum, optional, default: high_precision, deprecated) — The method to use for splitting documents. `high_precision` is more accurate but slower, while `low_latency` is faster but less precise. **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
  - Allowed values: `high_precision`, `low_latency`
- `fixedPageLimit` (integer, optional, deprecated) — Limit processing to a specific number of pages from the beginning of the document. See [Page Ranges](https://docs.extend.ai/2026-02-09/page-ranges).

### ParentSplit

The split metadata details for a derivative file. **Availability:** Only included if this file is a derivative of another file, for instance if it was created via a Splitter in a workflow.

- `id` (string, required) — The ID of the split.
- `type` (string, required) — The type of the split.
- `identifier` (string, required) — The identifier of the split.
- `startPage` (integer, required) — The start page of the split.
- `endPage` (integer, required) — The end page of the split.

### FileContentsPagesItems

- `pageNumber` (integer, required) — The page number of this page in the document.
- `pageHeight` (double, optional) — The height of the page in points. Available for PDF and IMG file types.
- `pageWidth` (double, optional) — The width of the page in points. Available for PDF and IMG file types.
- `markdown` (string, optional) — Cleaned and structured markdown content of this page. Available for PDF and IMG file types when the `markdown` query parameter is set to true.
- `html` (string, optional) — HTML content of the page. Available for DOCX file types when the `html` query parameter is set to true.

### FileContentsSectionsItems

- `startPageNumber` (integer, required) — The starting page number of this section.
- `endPageNumber` (integer, required) — The ending page number of this section.
- `markdown` (string, required) — The markdown content of this section.

### FileContentsSheetsItems

- `sheetName` (string, required) — The name of the sheet.
- `rawText` (string, optional) — The raw text content of the sheet in CSV format.

### PageRangesItems

- `start` (integer, required) — The start page of the range.
- `end` (integer, required, default: 750) — The end page of the range.

### ParseConfigChunkingStrategy

Strategy for dividing the document into chunks.

- `type` (enum, optional, default: page) — The type of chunking strategy. Supported values: * `page`: Chunk document by pages. * `document`: Entire document is a single chunk. Essentially no chunking. * `section`: Split by logical sections. Not supported for target=spatial.
  - Allowed values: `page`, `document`, `section`
- `options` (ParseConfigChunkingStrategyOptions, optional) — Additional options for the chunking strategy.

### ParseConfigBlockOptions

Options for controlling how different block types are processed.

- `figures` (ParseConfigBlockOptionsFigures, optional) — Options for figure blocks.
- `tables` (ParseConfigBlockOptionsTables, optional) — Options for table blocks.
- `text` (ParseConfigBlockOptionsText, optional) — Options for text blocks.
- `keyValue` (ParseConfigBlockOptionsKeyValue, optional) — Options for key-value pair blocks.
- `barcodes` (ParseConfigBlockOptionsBarcodes, optional) — Options for barcode blocks.
- `formulas` (ParseConfigBlockOptionsFormulas, optional) — Options for formula blocks.

### ParseConfigAdvancedOptions

- `pageRotationEnabled` (boolean, optional, default: true) — Whether to automatically detect and correct page rotation.
- `pageRanges` (list of PageRangesItems, optional) — Limit processing to the specified page ranges. See [Page Ranges](https://docs.extend.ai/2026-02-09/page-ranges).
- `excelParsingMode` (enum, optional) — Controls how Excel files are parsed. * `basic`: Fast, deterministic parsing. * `advanced`: Enable layout block detection for complex spreadsheets. This mode incurs additional credits when enabled. For `.xls` files, `basic` mode is always used.
  - Allowed values: `basic`, `advanced`
- `excelSkipHiddenContent` (boolean, optional, default: false) — Whether to exclude hidden rows, columns, and sheets when parsing Excel files.
- `excelUseRawCellValues` (boolean, optional, default: false) — Whether to return raw calculated cell values instead of locale-formatted values when parsing Excel files. Useful when downstream processing needs the underlying numeric or unformatted data.
- `excelSkipCalculation` (boolean, optional, default: true) — Whether to skip formula recalculation when opening Excel workbooks. Significantly improves parsing speed for formula-heavy spreadsheets. Disable if cell values depend on volatile functions like NOW() or TODAY().
- `excelIncludeCellMetadata` (boolean, optional, default: false) — Whether to include spreadsheet cell provenance when parsing Excel files in advanced mode. When enabled, table cell block details include source cell references and formulas, text or heading block details can include source ranges, and HTML table output includes `data-cell` and `data-formula` attributes.
- `excelIncludeCellFormatting` (boolean, optional, default: false) — Whether to include spreadsheet cell formatting when parsing Excel files in advanced mode. When enabled, table cell block details include structured formatting such as bold, italic, font color, and background color, and HTML table output preserves inline cell styles.
- `verticalGroupingThreshold` (double, optional, default: 1) — Multiplier for the Y-axis threshold used to determine if text blocks should be placed on the same line or not (0.1-5.0, default 1.0). Higher values group elements that are further apart vertically. Only applies when the spatial target is set.
- `returnOcr` (ParseConfigAdvancedOptionsReturnOcr, optional) — Options for returning raw OCR data in the response.
- `alwaysConvertToPdf` (boolean, optional, default: false) — Whether to convert supported file types (images, Word documents, PowerPoint, Excel, HTML) to PDF before parsing. This can improve parsing quality for some file types and ensures spatial output with bounding boxes.
- `enrichmentFormat` (enum, optional, default: xml) — The format used for enrichment annotations in the output. * `xml`: Use XML-style tags for enrichment annotations, e.g. 1 or 1234567890 * `bracket`: Use bracket-style notation for enrichment annotations, e.g. \[page\_number: 1] or \[barcode: 1234567890]
  - Allowed values: `xml`, `bracket`
- `imageConversionQuality` (enum, optional, default: medium) — Controls the quality level when converting images or documents to PDF for parsing. * `high`: Maximum quality, can add some latency for large/dense documents * `medium`: Balanced quality and speed * `low`: Lower quality, smaller file sizes, faster processing
  - Allowed values: `high`, `medium`, `low`
- `formattingDetection` (list of ParseConfigAdvancedOptionsFormattingDetectionItems, optional) — Enable detection of formatting-based annotations in the document. Currently supports change tracking detection. When enabled, detected changes are represented inline within the `content` field of applicable blocks using standard HTML change-tracking 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. Affected block types: `text`, `heading`, `section_heading`, `header`, `footer`. **Note:** Requires `engine: "parse_performance"` with `engineVersion >= "2.0.0"`.

### LegacyExtractionAdvancedOptionsReviewAgent

Configuration for the review agent that analyzes extraction results. When enabled, each field in the output metadata will include a `reviewAgentScore` (1-5) and may include additional `insights` of type `issue` or `review_summary` to help identify fields that may need manual review. Enabling the review agent incurs additional credits. To learn more, view the [Review Agent Documentation](https://docs.extend.ai/2026-02-09/extraction/review-agent)

- `enabled` (boolean, optional) — Whether to enable the review agent for the extraction output.

### ArrayStrategy

- `type` (enum, required) — The strategy type for handling large array use cases. For most use cases this should be left null, or should be set to `large_array_heuristics`. If you're unsure of what your use case needs, reach out to the Extend team for help. - `large_array_heuristics`: Optimized for documents with very large arrays, but where latency matters. This strategy uses specialized heuristics around chunking, tables, and merging to handle large arrays efficiently over large documents. - `large_array_max_context`: Optimizes for accuracy over latency in documents with very large arrays. This strategy will do multiple passes through the entire document to ensure there is no context loss across any chunks/pages, maximizing accuracy for complex array extraction, but adding material latency. This strategy incurs additional extraction credits when enabled. - `large_array_overlap_context`: Balances accuracy and latency in documents with very large arrays. This strategy will always maintain surrounding/overlapping page context for every chunk/page that is extracted, eliminating array failure modes from context loss across page boundaries.
  - Allowed values: `large_array_heuristics`, `large_array_max_context`, `large_array_overlap_context`

### LegacyExtractChunkingOptions

- `chunkingStrategy` (enum, optional) — The strategy to use for chunking the document.
  - Allowed values: `standard`, `semantic`
- `pageChunkSize` (integer, optional) — The size of page chunks.
- `chunkSelectionStrategy` (enum, optional) — The strategy to use for selecting chunks.
  - Allowed values: `intelligent`, `confidence`, `take_first`, `take_last`
- `customSemanticChunkingRules` (string, optional) — Custom rules for semantic chunking.

### ExcelSheetRange

- `start` (integer, required) — The starting sheet index (0-based).
- `end` (integer, required) — The ending sheet index (0-based). Must be greater than or equal to start.

### Enum

- `value` (string, required) — The value of the enum option.
- `description` (string, required) — Description of what this enum value represents.

### ParseConfigChunkingStrategyOptions

Additional options for the chunking strategy.

- `minCharacters` (integer, optional, default: 500) — Specify a minimum number of characters per chunk.
- `maxCharacters` (integer, optional, default: 10000) — Specify a maximum number of characters per chunk.

### ParseConfigBlockOptionsFigures

Options for figure blocks.

- `enabled` (boolean, optional, default: true) — Whether to include figures in the output.
- `figureImageClippingEnabled` (boolean, optional, default: true) — Whether to clip and extract images from figures.
- `advancedChartExtractionEnabled` (boolean, optional, default: false) — Whether to enable advanced chart extraction using vision models for improved data extraction from charts.
- `customInstructions` (string, optional) — Custom instructions injected into the vision model prompt used to analyze and summarize figures. Use to steer figure descriptions toward your use case (e.g. domain terminology, details to always capture). Requires `enabled: true`. Available on `parse_performance` >= `2.0.0` and `parse_light` >= `1.0.0`.

### ParseConfigBlockOptionsTables

Options for table blocks.

- `targetFormat` (enum, optional, default: html) — The target format for the table blocks. Supported values: * `markdown`: Convert table to Markdown format * `html`: Convert table to HTML format
  - Allowed values: `markdown`, `html`
- `tableHeaderContinuationEnabled` (boolean, optional, default: false) — Whether to automatically copy table headers to headerless tables on subsequent pages when they have matching column counts. Useful for multi-page tables.
- `cellBlocksEnabled` (boolean, optional, default: false) — Whether to include individual table cell blocks in the output. When enabled, each cell in a table will be represented as a separate block with its own bounding box and content and will be `children` of the table block. Only supported on `parse_performance` engineVersion `1.0.1`.
- `agentic` (ParseConfigBlockOptionsTablesAgentic, optional) — Options for agentic table processing using VLM-based review and correction. Enabling this incurs additional credits on pages where agentic table correction is triggered.
- `enabled` (boolean, optional, default: true, deprecated) — This option is deprecated and will have no effect. It will be removed in the next API version.

### ParseConfigBlockOptionsText

Options for text blocks.

- `signatureDetectionEnabled` (boolean, optional, default: false) — Whether an additional vision model will be utilized for advanced signature detection. Recommended for most use cases, but should be disabled if signature detection is not necessary and latency is a concern.
- `agentic` (ParseConfigBlockOptionsTextAgentic, optional) — Options for agentic text processing using VLM-based review and correction. Enabling this incurs additional credits on pages where agentic text correction is triggered.

### ParseConfigBlockOptionsKeyValue

Options for key-value pair blocks.

- `blankFieldFormattingEnabled` (boolean, optional, default: false) — Whether to preserve blank field formatting for key-value pairs with empty values.

### ParseConfigBlockOptionsBarcodes

Options for barcode blocks.

- `imageClippingEnabled` (boolean, optional, default: false) — Whether to clip and extract images of barcodes. When enabled, barcode images will be available in the `imageUrl` field of BarcodeDetails.
- `readingEnabled` (boolean, optional, default: false) — Whether to decode and read barcode values. When enabled, decoded values will be available in the `decodedValue` field of BarcodeDetails.

### ParseConfigBlockOptionsFormulas

Options for formula blocks.

- `enabled` (boolean, optional, default: false) — Whether to enable formula detection and parsing. When enabled, mathematical formulas and equations are detected and their LaTeX representations are included in the output. When disabled, formulas will be detected as text blocks and may not be accurately parsed.

### ParseConfigAdvancedOptionsReturnOcr

Options for returning raw OCR data in the response.

- `words` (boolean, optional, default: false) — Whether to include word-level OCR data in the response, including word bounding boxes and confidence scores. This meaningfully impacts the response size, consider using the signed url return format.

### ParseConfigAdvancedOptionsFormattingDetectionItems

- `type` (enum, required) — The type of formatting detection to enable. * `"change_tracking"` — Detect tracked changes (insertions, deletions, substitutions) indicated by strikethroughs, colored text, or underlines in the source document.
  - Allowed values: `change_tracking`

### ParseConfigBlockOptionsTablesAgentic

Options for agentic table processing using VLM-based review and correction. Enabling this incurs additional credits on pages where agentic table correction is triggered.

- `enabled` (boolean, optional, default: false) — Whether to enable agentic table processing.
- `customInstructions` (string, optional) — Custom instructions to guide the agentic table processing.

### ParseConfigBlockOptionsTextAgentic

Options for agentic text processing using VLM-based review and correction. Enabling this incurs additional credits on pages where agentic text correction is triggered.

- `enabled` (boolean, optional, default: false) — Whether to enable agentic text processing for OCR corrections.
- `customInstructions` (string, optional) — Custom instructions to guide the agentic text processing.

## Examples

**Response**

```json
{
  "success": true,
  "processorRun": {
    "object": "document_processor_run",
    "id": "exr_Xj8mK2pL9nR4vT7qY5wZ",
    "processorId": "ex_Xj8mK2pL9nR4vT7qY5wZ",
    "processorVersionId": "exv_Xj8mK2pL9nR4vT7qY5wZ",
    "processorName": "Invoice Processor",
    "status": "PENDING",
    "output": {},
    "reviewed": false,
    "edited": false,
    "edits": {},
    "type": "CLASSIFY",
    "config": {
      "type": "CLASSIFY",
      "baseProcessor": "classification_performance",
      "baseVersion": "3.2.0",
      "classifications": [
        {
          "id": "my_unique_id",
          "type": "invoice",
          "description": "An invoice is a document that lists the items purchased and the total amount due."
        }
      ],
      "classificationRules": "Remember, when it comes to differentiating between invoices and purchase orders, the most important thing to look for is the date of the document.",
      "advancedOptions": {
        "context": "default",
        "advancedMultimodalEnabled": false,
        "fixedPageLimit": 30,
        "pageRanges": [
          {
            "start": 1,
            "end": 10
          },
          {
            "start": 20,
            "end": 30
          }
        ]
      },
      "parser": {
        "target": "markdown",
        "chunkingStrategy": {
          "type": "page",
          "options": {
            "minCharacters": 500,
            "maxCharacters": 10000
          }
        },
        "engine": "parse_performance",
        "engineVersion": "latest",
        "blockOptions": {
          "figures": {
            "enabled": true,
            "figureImageClippingEnabled": true,
            "advancedChartExtractionEnabled": false,
            "customInstructions": "string"
          },
          "tables": {
            "enabled": true,
            "targetFormat": "html",
            "tableHeaderContinuationEnabled": false,
            "cellBlocksEnabled": false,
            "agentic": {
              "enabled": false,
              "customInstructions": "string"
            }
          },
          "text": {
            "signatureDetectionEnabled": false,
            "agentic": {
              "enabled": false,
              "customInstructions": "string"
            }
          },
          "keyValue": {
            "blankFieldFormattingEnabled": false
          },
          "barcodes": {
            "imageClippingEnabled": false,
            "readingEnabled": false
          },
          "formulas": {
            "enabled": false
          }
        },
        "advancedOptions": {
          "pageRotationEnabled": true,
          "pageRanges": [
            {
              "start": 1,
              "end": 10
            },
            {
              "start": 20,
              "end": 30
            }
          ],
          "excelParsingMode": "basic",
          "excelSkipHiddenContent": false,
          "excelUseRawCellValues": false,
          "excelSkipCalculation": true,
          "excelIncludeCellMetadata": false,
          "excelIncludeCellFormatting": false,
          "verticalGroupingThreshold": 1,
          "returnOcr": {
            "words": false
          },
          "alwaysConvertToPdf": false,
          "enrichmentFormat": "xml",
          "imageConversionQuality": "medium",
          "formattingDetection": [
            {
              "type": "change_tracking"
            }
          ]
        }
      }
    },
    "files": [
      {
        "object": "file",
        "id": "file_xK9mLPqRtN3vS8wF5hB2cQ",
        "name": "Invoices.pdf",
        "type": "PDF",
        "presignedUrl": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "parentFileId": "file_Zk9mNP12Qw4yTv8BdR3H",
        "metadata": {
          "pageCount": 30,
          "parentSplit": {
            "id": "string",
            "type": "Invoice",
            "identifier": "other_2_9",
            "startPage": 1,
            "endPage": 10
          }
        },
        "createdAt": "2024-03-21T16:45:00Z",
        "updatedAt": "2024-03-21T16:45:00Z",
        "contents": {
          "rawText": "string",
          "pages": [
            {
              "pageNumber": 1,
              "pageHeight": 792,
              "pageWidth": 612,
              "markdown": "# Heading\n\nThis is a paragraph with **bold** and *italic* text.\n\n- List item 1\n- List item 2\n\n> This is a blockquote",
              "html": "<div>This is the html of the page.</div>"
            }
          ],
          "sections": [
            {
              "startPageNumber": 1,
              "endPageNumber": 3,
              "markdown": "# Section Header\n\nContent spanning multiple pages...\n"
            }
          ],
          "sheets": [
            {
              "sheetName": "Sheet1",
              "rawText": "Column1,Column2\nValue1,Value2"
            }
          ]
        }
      }
    ],
    "mergedProcessors": [
      {
        "processorId": "ex_Xj8mK2pL9nR4vT7qY5wZ",
        "processorVersionId": "exv_Xj8mK2pL9nR4vT7qY5wZ",
        "processorName": "Invoice Line Items Processor"
      }
    ],
    "url": "https://dashboard.extend.ai/runs/exr_Xj8mK2pL9nR4vT7qY5wZ",
    "failureReason": "string",
    "failureMessage": "string",
    "metadata": {},
    "initialOutput": {},
    "reviewedOutput": {},
    "usage": {
      "credits": 3.5
    }
  }
}
```