API Reference
- GETPing Health
- GETGet Available Models
- POSTRetrieve Chunks
- POSTRetrieve Chunks Grouped
- POSTRetrieve Documents
- POSTBatch Get Documents
- POSTBatch Get Chunks
- POSTQuery Completion
- GETGet Chat History
- GETGet Available Models For Selection
- POSTAgent Query
- POSTList Documents
- GETGet Document
- DELDelete Document
- GETGet Document Status
- GETGet Document By Filename
- GETGet Document Download Url
- GETDownload Document File
- POSTUpdate Document Text
- POSTUpdate Document File
- POSTUpdate Document Metadata
- GETGet Usage Stats
- GETGet Recent Usage
- POSTCreate Cache
- GETGet Cache
- POSTUpdate Cache
- POSTAdd Docs To Cache
- POSTQuery Cache
- POSTCreate Graph
- GETList Folders
- POSTCreate Folder
- GETList Folder Summaries
- GETGet Folder
- DELDelete Folder
- POSTAdd Document To Folder
- DELRemove Document From Folder
- GETGet Graph
- DELDelete Graph
- GETList Graphs
- GETGet Graph Visualization
- POSTUpdate Graph
- GETGet Graph Status
- GETCheck Workflow Status
- POSTGenerate Local Uri
- POSTGenerate Cloud Uri
- POSTSet Folder Rule
- POSTAssociate Workflow To Folder
- DELDisassociate Workflow From Folder
- GETList Folder Workflows
- DELDelete Cloud App
- GETList Chat Conversations
- PATCHUpdate Chat Title
Workflows
model-config
Logs
API Reference
Retrieve Chunks Grouped
Retrieve relevant chunks with grouped response format.
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, filters, padding, etc. auth: Authentication context
Returns: GroupedChunkResponse: Contains both flat chunks and grouped chunks
POST
/
retrieve
/
chunks
/
grouped
Copy
Ask AI
{
"chunks": [
{
"content": "<string>",
"score": 123,
"document_id": "<string>",
"chunk_number": 123,
"metadata": {},
"content_type": "<string>",
"filename": "<string>",
"download_url": "<string>",
"is_padding": true
}
],
"groups": [
{
"main_chunk": {
"content": "<string>",
"score": 123,
"document_id": "<string>",
"chunk_number": 123,
"metadata": {},
"content_type": "<string>",
"filename": "<string>",
"download_url": "<string>",
"is_padding": true
},
"padding_chunks": [
{
"content": "<string>",
"score": 123,
"document_id": "<string>",
"chunk_number": 123,
"metadata": {},
"content_type": "<string>",
"filename": "<string>",
"download_url": "<string>",
"is_padding": true
}
],
"total_chunks": 123
}
],
"total_results": 123,
"has_padding": true
}
Headers
Body
application/json
Base retrieve request model
Response
200
application/json
Successful Response
Response that includes both flat results and grouped results for UI
Was this page helpful?
Copy
Ask AI
{
"chunks": [
{
"content": "<string>",
"score": 123,
"document_id": "<string>",
"chunk_number": 123,
"metadata": {},
"content_type": "<string>",
"filename": "<string>",
"download_url": "<string>",
"is_padding": true
}
],
"groups": [
{
"main_chunk": {
"content": "<string>",
"score": 123,
"document_id": "<string>",
"chunk_number": 123,
"metadata": {},
"content_type": "<string>",
"filename": "<string>",
"download_url": "<string>",
"is_padding": true
},
"padding_chunks": [
{
"content": "<string>",
"score": 123,
"document_id": "<string>",
"chunk_number": 123,
"metadata": {},
"content_type": "<string>",
"filename": "<string>",
"download_url": "<string>",
"is_padding": true
}
],
"total_chunks": 123
}
],
"total_results": 123,
"has_padding": true
}
Assistant
Responses are generated using AI and may contain mistakes.