Docling Serve icon

Docling Serve

Convert documents using Docling Serve API

Chunk → Chunk From File

AI-generated

Summary

Chunk a document from binary file data using a specified chunking strategy, returning the document broken into chunks based on either a hybrid or hierarchical chunker.

Inputs

  • Chunker Type — Selects the chunking strategy to apply: 'hybrid' (combining multiple strategies) or 'hierarchical' (based on document structure). Defaults to 'hybrid'.
  • Input Binary Field (required) — Name of the binary property in the input item containing the file to be chunked. Defaults to 'data'.
  • Additional Options — Collection of optional settings affecting OCR processing, table extraction, image handling, token limits, timeouts, and other chunking details. Includes options like 'Do OCR', 'Force OCR', 'Max Tokens per chunk', 'Include Images', 'Tokenizer' model, and more.

Output shape

a single JSON object representing the chunked document response

Returns the processed chunked data in JSON format corresponding to the input file, paired with the input item. The output includes chunk details according to the selected chunker type and options. This operation is synchronous and will wait for processing to complete before returning results.

Examples

Example 1: Chunk a PDF file uploaded as a binary property named 'fileData' using a hierarchical chunker, with OCR enabled and images included.

Set 'Chunker Type' to 'Hierarchical', 'Input Binary Field' to 'fileData', and enable 'Do OCR' and 'Include Images' in 'Additional Options'. Execute the node to receive chunked JSON output of the PDF file.

Links

Discussion