Retrieve Full Document Content in Chunks
Retrieve full document content split into chat-optimized chunks.
This endpoint provides access to complete document content split into manageable chunks suitable for chat interfaces. Unlike semantic chunk retrieval, this returns complete documents divided sequentially.
Key Features:
- Chat-Optimized Chunking: Documents split into conversational pieces
- Node Type Filtering: Include or exclude images, tables, and other node types
- Token-Aware Splitting: Respects token limits for chat context management
- Sequential Chunks: Maintains document order and narrative flow
- Filtered Retrieval: Select specific documents using metadata filters
- Token Limiting: Optional max_tokens parameter to control response size
Content Filtering:
- Use include to retrieve only specific node types
- Use exclude to omit unwanted content types
- Supports TextNode, ImageNode, TableNode, and other node types
- Filtering is applied before chunking
Chunking Process:
- Retrieve filtered documents based on context criteria
- Apply node type filters (include/exclude)
- Split documents into chat-appropriate segments respecting max_tokens
- Return structured chunks with metadata and citations
Notes:
- Chunks maintain document structure and logical flow
- Token limiting prevents context window overflow
- Node type filtering reduces payload size and improves relevance
- Use /artifacts/search endpoint for semantic search instead
Request body
Example request
{
"context_filter": {
"collection": "collection_name",
"artifacts": [
"artifact_id_1, artifact_id_2"
],
"metadata_filter": [
{
"key": "file_id",
"operator": "==",
"value": "artifact_id_1"
}
]
}
}Response
Successful chunked content retrieval
Example response
{
"data": [
{
"artifact_id": "annual_report_2023",
"content": [
{
"text": "ANNUAL REPORT 2023\n\nExecutive Summary\n\nFiscal year 2023 marked a transformative period...",
"type": "text"
}
]
}
]
}Changes
Changed in 3 of the 11 revisions of this API.615
- ▲
the response property
data/items/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/source/oneOf[subschema #2: PlainTextSource]/typebecame optional for the status200response-property-became-optional
- ▲
the response property
data/items/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/source/oneOf[subschema #3: ContentSource]/typebecame optional for the status200response-property-became-optional
- ▲
the response property
data/items/content/items/anyOf[subschema #16: TLDRBlock -> subschema #17: TLDRBlock]/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/source/oneOf[subschema #2: PlainTextSource]/typebecame optional for the status200response-property-became-optional
- ▲
the response property
data/items/content/items/anyOf[subschema #16: TLDRBlock -> subschema #17: TLDRBlock]/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/source/oneOf[subschema #3: ContentSource]/typebecame optional for the status200response-property-became-optional
- ▲
added
Base64SourceURLDocumentSourceto thedata/items/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse propertyoneOflist for the response status200response-property-one-of-added
- ▲
added
Base64SourceURLDocumentSourceto thedata/items/content/items/anyOf[subschema #16: TLDRBlock -> subschema #17: TLDRBlock]/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse propertyoneOflist for the response status200response-property-one-of-added
- ○
added
LocalResourceBlockto thedata/items/content/items/response propertyanyOflist for the response status200response-property-any-of-added
- ○
added
LocalResourceBlockto thedata/items/content/items/anyOf[subschema #16: TLDRBlock -> subschema #17: TLDRBlock]/content/items/response propertyanyOflist for the response status200response-property-any-of-added
- ○
the
typeresponse's property default valuecontentwas added for the status200response-property-default-value-added
- ○
the
typeresponse's property default valuecontentwas added for the status200response-property-default-value-added
- ○
the
typeresponse's property default valuetextwas added for the status200response-property-default-value-added
- ○
the
typeresponse's property default valuetextwas added for the status200response-property-default-value-added
- ○
mapped value for discriminator key
base64changed fromBase64PDFSourcetoBase64Sourcefordata/items/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse property for the response status200response-property-discriminator-mapping-changed
- ○
mapped value for discriminator key
base64changed fromBase64PDFSourcetoBase64Sourcefordata/items/content/items/anyOf[subschema #16: TLDRBlock -> subschema #17: TLDRBlock]/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse property for the response status200response-property-discriminator-mapping-changed
- ○
mapped value for discriminator key
urlchanged fromURLPDFSourcetoURLDocumentSourcefordata/items/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse property for the response status200response-property-discriminator-mapping-changed
- ○
mapped value for discriminator key
urlchanged fromURLPDFSourcetoURLDocumentSourcefordata/items/content/items/anyOf[subschema #16: TLDRBlock -> subschema #17: TLDRBlock]/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse property for the response status200response-property-discriminator-mapping-changed
- ○
removed
Base64PDFSourceURLPDFSourcefrom thedata/items/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse propertyoneOflist for the response status200response-property-one-of-removed
- ○
removed
Base64PDFSourceURLPDFSourcefrom thedata/items/content/items/anyOf[subschema #16: TLDRBlock -> subschema #17: TLDRBlock]/content/items/anyOf[subschema #13: DocumentBlock -> subschema #14: DocumentBlock]/sourceresponse propertyoneOflist for the response status200response-property-one-of-removed
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
added
MidConvSystemBlockto thedata/items/content/items/response propertyanyOflist for the response status200response-property-any-of-added
- ○
added
MidConvSystemBlockto thedata/items/content/items/anyOf[subschema #15: TLDRBlock -> subschema #16: TLDRBlock]/content/items/response propertyanyOflist for the response status200response-property-any-of-added
- ○
- ○
endpoint added
endpoint-added
This revision also has 13 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○