For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact usJoin the Discord
ManualAPI GuideAPI Reference
  • Overview
    • API Reference
    • Client libraries
  • API Reference
      • POSTIngest Content
      • GETList Ingested Documents
      • POSTDelete Ingested Document
      • POSTRetrieve Full Document Content
      • POSTRetrieve Full Document Content in Chunks
LogoLogo
Contact usJoin the Discord
API ReferenceArtifacts

Retrieve Full Document Content in Chunks

POST
https://host.com/v1/artifacts/chunked-content
POST
/v1/artifacts/chunked-content
$curl -X POST https://host.com/v1/artifacts/chunked-content \
> -H "Content-Type: application/json" \
> -d '{
> "context_filter": {}
>}'
1{
2 "data": [
3 {
4 "artifact_id": "annual_report_2023",
5 "content": []
6 },
7 {
8 "artifact_id": "quarterly_summary_q4",
9 "content": []
10 }
11 ]
12}
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: 1. Retrieve filtered documents based on context criteria 2. Apply node type filters (include/exclude) 3. Split documents into chat-appropriate segments respecting max_tokens 4. 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
Was this page helpful?
Previous

Retrieve Chunks using Semantic, Keyword, or Hybrid Search

Next
Built with

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:

  1. Retrieve filtered documents based on context criteria
  2. Apply node type filters (include/exclude)
  3. Split documents into chat-appropriate segments respecting max_tokens
  4. 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

This endpoint expects an object.
context_filterobjectRequired
Filter to select documents to retrieve. Supports filtering by collection, artifacts, and metadata.
formatenumOptional
Format for returned content. 'object' returns structured data, 'markdown' returns content formatted as markdown text.
Allowed values:
filterobjectOptional
Content filtering options to include or exclude specific node types. Use this to control the types of content returned in the response.
max_tokensintegerOptional>=1
Maximum number of tokens to return in the content. If not set, returns full content of the documents.

Response

This endpoint returns an object.
datalist of objects
List of documents with their content split into chunks for chat usage

Errors

401
Unauthorized
422
Unprocessable Entity