v1

latestOpenAPI 3.0.3MIT OR Apache-2.02026-07-17203670.3 KB
documents

Update a document node

Partially updates a single node by its document and node IDs. Only provided fields are changed. metadata.attributes is merged key-by-key. cross_ref_node_ids is replaced when provided.

patch/v1/documents/{id}/nodes/{node_id}

Path parameters

idstring required
Example:doc_abc123

Document ID

node_idstring required
Example:node_xyz789

Node ID

Request body

titlestring

Updated node title

summarystring

Updated LLM summary used during tree traversal

contentstring

Updated leaf content (only meaningful for leaf nodes)

image_pathstring

Updated path to associated image for vision-enabled reasoning

Example request

{
  "title": "Chapter 3: Neural Networks — Revised",
  "summary": "This chapter covers neural network fundamentals including backpropagation.",
  "content": "Neural networks are computing systems loosely inspired by biological neural networks...",
  "image_path": "/uploads/figure-3-1.png",
  "metadata": {
    "page_number": 3,
    "section_type": "section",
    "confidence_score": 0.95,
    "attributes": {
      "source": "manual",
      "reviewed": "true"
    },
    "cross_ref_node_ids": [
      "node_abc",
      "node_def"
    ]
  }
}

Response

Node updated successfully

idstring

Unique node ID

document_idstring

Parent document ID

titlestring

Node title

summarystring

LLM-generated summary used for tree traversal

depthinteger

Depth in the tree (0 = root)

is_leafboolean

Whether this is a leaf node (no children)

contentstring

Actual content (only present for leaf nodes)

image_pathstring

Path to associated image for vision-enabled reasoning

parent_idstring

Parent node ID (null for root nodes)

children_idsstring[]

IDs of child nodes

page_numberinteger

Page number in the source document

section_typestring

Section type (e.g. 'chapter', 'section', 'paragraph')

confidence_scorenumber float

Confidence score assigned during ingestion

attributesobject

Custom key-value attributes (string values)

cross_ref_node_idsstring[]

IDs of sibling nodes this node cross-references

created_atstring date-time

Node creation timestamp

updated_atstring date-time

Last update timestamp

Example response

{
  "id": "node_xyz789",
  "document_id": "doc_abc123",
  "title": "Chapter 3: Neural Networks",
  "summary": "This chapter covers neural network fundamentals...",
  "depth": 1,
  "image_path": "/uploads/figure-3-1.png",
  "parent_id": "node_root_abc",
  "children_ids": [
    "node_child1",
    "node_child2"
  ],
  "page_number": 3,
  "section_type": "chapter",
  "confidence_score": 0.95,
  "attributes": {
    "source": "manual"
  },
  "cross_ref_node_ids": [],
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:35:00Z"
}