Recursive Chunker

Recursively chunks documents into smaller chunks. It is a good choice for documents that are long but well structured.

post/v1/chunk/recursive

Response

Successful Response: A list of RecursiveChunk objects.

textstring

The actual text content of the chunk.

start_indexinteger

The starting character index of the chunk within the original input text.

end_indexinteger

The ending character index (exclusive) of the chunk within the original input text.

token_countinteger

The number of tokens in this specific chunk, according to the tokenizer used.

levelinteger

The level of this chunk in the recursive splitting process (starts from 0).

Changes

Changed in 11 of the 20 revisions of this API.10920

    • endpoint added

      endpoint-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • api removed without deprecation

      api-removed-without-deprecation

    This revision also has 19 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the min_characters_per_chunk request property default value changed from 1 to 12

      request-property-default-value-changed

    • removed the request property text

      request-property-removed

  • b5fe83cf70c611See the full diff
    • removed the media type application/json from the request body

      request-body-media-type-removed

    • added the media type multipart/form-data to the request body

      request-body-media-type-added

  • e779d3fd51d512See the full diff
    • removed the request property rules

      request-property-removed

    • added the new optional request property lang

      new-optional-request-property

    • added the new optional request property recipe

      new-optional-request-property

    • request property return_type was restricted to a list of enum values

      request-property-became-enum

    • added the new chunks enum value to the request property return_type

      request-property-enum-value-added

    • added the new texts enum value to the request property return_type

      request-property-enum-value-added

    • the request property chunk_size became optional

      request-property-became-optional

  • a9d5b6b90675515See the full diff
    • the response property items/end_index became optional for the status 200

      response-property-became-optional

    • the response property items/level became optional for the status 200

      response-property-became-optional

    • the response property items/start_index became optional for the status 200

      response-property-became-optional

    • the response property items/text became optional for the status 200

      response-property-became-optional

    • the response property items/token_count became optional for the status 200

      response-property-became-optional

    • removed the request property args

      request-property-removed

    • added the new optional request property min_characters_per_chunk

      new-optional-request-property

    • added the new optional request property return_type

      new-optional-request-property

    • added the new optional request property rules

      new-optional-request-property

    • added the new optional request property tokenizer_or_token_counter

      new-optional-request-property

    • added the new required request property chunk_size with a default value

      new-required-request-property-with-default

    • removed the non-success response with the status 401

      response-non-success-status-removed

    • removed the non-success response with the status 422

      response-non-success-status-removed

    • removed the non-success response with the status 500

      response-non-success-status-removed

    • added the required property items/level to the response with the 200 status

      response-required-property-added