v1

latestOpenAPI 3.1.02026-07-13175151.8 KB
Tasks

Create Parse Task

Queues a document for processing and returns a TaskResponse with the assigned task_id, initial configuration, file metadata, and timestamps. The initial status is Starting.

Creates a parse task and returns its metadata immediately.

post/tasks/parse

Request body

error_handling'Fail' | 'Continue'

Controls how errors are handled during processing:

  • Fail: Stops processing and fails the task when any error occurs
  • Continue: Attempts to continue processing despite non-critical errors (eg. LLM refusals etc.)
ocr_strategy'All' | 'Auto'

Controls the Optical Character Recognition (OCR) strategy.

  • All: Processes all pages with OCR. (Latency penalty: ~0.5 seconds per page)
  • Auto: Selectively applies OCR only to pages with missing or low-quality text. When text layer is present the bounding boxes from the text layer are used.
pipeline'Azure' | 'Chunkr'
segmentation_strategy'LayoutAnalysis' | 'Page'

Controls the segmentation strategy:

  • LayoutAnalysis: Analyzes pages for layout elements (e.g., Table, Picture, Formula, etc.) using bounding boxes. Provides fine-grained segmentation and better chunking.
  • Page: Treats each page as a single segment. Faster processing, but without layout element detection and only simple chunking.
expires_ininteger nullable

The number of seconds until task is deleted. Expired tasks can not be updated, polled or accessed via web interface.

filestring required

The file to be parsed. Supported inputs:

  • ch://files/{file_id}: Reference to an existing file. Upload via the Files API
  • http(s)://...: Remote URL to fetch
  • data:*;base64,... or raw base64 string
file_namestring nullable

The name of the file to be parsed. If not set a name will be generated.

Response

Task created successfully.

completedboolean required

True when the task reaches a terminal state i.e. status is Succeeded or Failed or Cancelled

created_atstring date-time required

The date and time when the task was created and queued.

expires_atstring date-time nullable

The date and time when the task will expire.

finished_atstring date-time nullable

The date and time when the task was finished.

input_file_urlstring nullable

The presigned URL of the input file. Deprecated use file_info.url instead.

messagestring required

A message describing the task's status or any errors that occurred.

started_atstring date-time nullable

The date and time when the task was started.

status'Starting' | 'Processing' | 'Succeeded' | 'Failed' | 'Cancelled' required

The status of the task.

task_idstring required

The unique identifier for the task.

task_type'Parse' | 'Extract' required
task_urlstring nullable

The presigned URL of the task.