from chonkie.cloud import OverlapRefinery 

refinery = OverlapRefinery(api_key="{api_key}") 

refined_chunks = refinery(chunks=[YOUR_CHUNKS])
[
  {
    "text": "<string>",
    "start_index": 123,
    "end_index": 123,
    "token_count": 123
  }
]

Authorizations

Authorization
string
header
required

Your API Key from the Chonkie Cloud dashboard

Body

application/json

Request body for the Overlap Refinery endpoint.

Response

200
application/json

Successful Response: A list of Chunk objects with added overlap context.

A list containing Chunk objects, potentially modified to include overlapping text or context.