Endpoint
Authentication
This endpoint requires API key authentication via theAuthorization header:
Request Body
The request body must be JSON with the following schema:string
required
The file to be uploaded. Can be a URL or a base64 encoded file.
string
The name of the file to be uploaded. If not set, a name will be generated.
enum
default:"All"
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.
enum
default:"LayoutAnalysis"
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.
boolean
default:true
Whether to use high-resolution images for cropping and post-processing. (Latency penalty: ~7 seconds per page)
integer
The number of seconds until task is deleted. Expired tasks cannot be updated, polled, or accessed via web interface.
enum
default:"Fail"
Controls how errors are handled during processing:
Fail: Stops processing and fails the task when any error occursContinue: Attempts to continue processing despite non-critical errors (e.g., LLM refusals)
object
Controls the settings for chunking and post-processing of each chunk.
object
Controls the post-processing of each segment type. Allows generation of HTML and Markdown from Chunkr models.
object
Controls the LLM used for the task.
Response
string
The unique identifier for the task
enum
The status of the task:
Starting, Processing, Succeeded, Failed, or Cancelledstring
The date and time when the task was created and queued (ISO 8601 format)
string
The date and time when the task started processing (ISO 8601 format)
string
The date and time when the task was finished (ISO 8601 format)
string
The date and time when the task will expire (ISO 8601 format)
string
A message describing the task’s status or any errors that occurred
string
The presigned URL of the task
object
The task configuration including all processing settings and the input file URL
object
Output data (only present when task is complete)
Status Codes
- 200: Task created successfully
- 400: Bad request (invalid file, invalid base64 data, unsupported file type)
- 429: Usage limit exceeded
- 500: Internal server error
Examples
Notes
- The returned task will typically be in a
StartingorProcessingstate - Use the GET /task/ endpoint to poll for completion
- Tasks have a status progression:
Starting→Processing→SucceededorFailed - If a task expires, it cannot be accessed, updated, or viewed via the web interface