v10

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-0643140398.0 KB
Artifacts
Artifacts

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:

  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
post/v1/artifacts/chunked-content

Request body

format'object' | 'markdown'

Enumeration of content retrieval formats.

max_tokensinteger nullable

Maximum number of tokens to return in the content. If not set, returns full content of the documents.

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"
        }
      ]
    }
  ]
}