Skip to main content
The chunkr api works by creating a task for each document you want to process, and then processing them asynchronously. Both creating and getting tasks return a task object.

Task Object

Both creating and getting tasks return a task object. It contains the information about the file you are processing as well as the output when the task is successful.

Output

The output response is a dictionary containing two keys: chunks and extracted_json. The chunks key contains the structured segments data as defined in the Chunks section, while the extracted_json key contains any structured data extracted from the document as defined in the Structured Extraction section. Below is an example of the output response:

Breakdown of the Extracted JSON

  • extracted_json: (Optional) Additional JSON data extracted based on the provided JSON schema during task creation.
    • title: The title of the extracted data.
    • schema_type: The type of JSON schema used.
    • extracted_fields: An array of fields extracted, each containing:
      • name: The name of the field.
      • field_type: The data type of the field (e.g., list, string).
      • value: The extracted value corresponding to the field.
For a comprehensive understanding of each component, please refer to the Structured Extraction and Chunks sections.