Retrieve Chunks Grouped

Retrieve relevant chunks with grouped response format.

Uses the same filter operators as /retrieve/chunks (equality, nested logic operators, $regex, $contains, etc.), with arbitrary nesting supported inside request.filters.

Returns both flat results (for backward compatibility) and grouped results (for UI). When padding > 0, groups chunks by main matches and their padding chunks.

Args: request: RetrieveRequest containing query parameters, metadata filters, and padding instructions auth: Authentication context

Returns: GroupedChunkResponse: Contains both flat chunks and grouped chunks

post/retrieve/chunks/grouped

Headers

authorizationstring

Request body

querystring required
filtersobject nullable
kinteger
min_scorenumber
use_rerankingboolean nullable
use_colpaliboolean nullable
paddinginteger

Number of additional chunks/pages to retrieve before and after matched chunks (ColPali only)

graph_namestring nullable

Name of the graph to use for knowledge graph-enhanced retrieval

hop_depthinteger nullable

Number of relationship hops to traverse in the graph

include_pathsboolean nullable

Whether to include relationship paths in the response

end_user_idstring nullable

Optional end-user scope for the operation

Response

Successful Response

total_resultsinteger required

Total number of unique chunks

has_paddingboolean required

Whether padding was applied to any results

Changes