v10

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

Retrieve Full Document Content

Retrieve the full content of filtered documents.

This endpoint provides access to complete document content rather than semantic chunks. Use this when you need the entire context of documents rather than relevant excerpts.

Key Features:

  • Full Content: Get complete documents rather than chunks
  • Multiple Formats: Return as markdown text or structured objects
  • Node Type Filtering: Include or exclude images, tables, and other node types
  • Node ID Filtering: Retrieve specific sections by their node IDs
  • Filtered Retrieval: Select specific documents using metadata filters
  • Bulk Retrieval: Get multiple documents in one request

Format Options:

  • markdown (default): Returns flattened markdown text representation
  • object: Returns hierarchical tree structure with typed nodes

Content Filtering:

  • Use include to retrieve only specific node types
  • Use exclude to omit unwanted content types
  • Use node_ids to retrieve specific sections or nodes by ID
  • Supports TextNode, ImageNode, TableNode, and other node types

Subtree Filtering:

  • Specify node_ids to retrieve only certain sections/nodes
  • Set include_children=True (default) to get full subtrees
  • Set include_children=False to get only specified nodes
  • Set include_ancestors=True to include parent context

Notes:

  • Node type filtering is applied to all retrieved documents
  • Object format preserves document structure and hierarchy
  • Markdown format provides a flattened, readable text representation
  • When node_ids is specified, returns filtered tree structure
post/v1/artifacts/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 content retrieval

Example response

{
  "data": [
    {
      "artifact_id": "annual_report_2023",
      "content": "ANNUAL REPORT 2023\n\nExecutive Summary\n\nFiscal year 2023 marked a transformative period..."
    }
  ]
}