Content
Blocks
Get block by ID
GET /blocks/{id}/
Retrieves a block object by its unique identifier.
Path parameters
id (integer) Required
:
A unique integer value identifying the block.
Returns
A BlockInput model.
Status Code
200 OK: Block retrieved successfully.
Update block by ID
PUT /blocks/{id}/
Updates an existing block by its ID. Requires all fields in the body.
Path parameters
id (integer) Required
:
A unique integer value identifying the block.
Request body
A JSON object matching the BlockInput model:
Request example
{
"metadata": {},
"text": "string",
"document_index": 2147483647,
"page_num": 2147483647,
"initial_block_text": "string"
}
Returns
A BlockInput object with updated values.
Status Code
200 OK: Block updated successfully.
Partially update block by ID
PATCH /blocks/{id}/
Partially updates an existing block. Only the provided fields will be updated.
Path parameters
id (integer) Required
:
A unique integer value identifying the block.
Request body
A partial JSON object matching the BlockInput model:
Request example
{
"metadata": {},
"text": "string",
"document_index": 2147483647,
"page_num": 2147483647,
"initial_block_text": "string"
}
Returns
A BlockInput object with updated values.
Status Code
200 OK: Block partially updated successfully.
Delete block by ID
DELETE /blocks/{id}/
Deletes a block by its ID.
Path parameters
id (integer) Required
:
A unique integer value identifying the block.
Status Code
204 No Content: Block successfully deleted.
Documents
List all documents
GET /documents/
Retrieves a paginated list of all uploaded documents.
Query parameters (optional)
page (integer):
Page number of the results.
page_size (integer):
Number of items to return per page.
Returns
An array of Documents objects. Each object includes document metadata, processing status, and associated node information.
Status Code
200 OK: List of documents returned successfully.
Response example
[
{
"id": 0,
"metadata": "string",
"node_id": [
"string"
],
"name": "string",
"doc_type": "Video",
"processing_status": "CREATED",
"processing_error_details": "string",
"created_at": "2025-07-01T19:02:23.221Z",
"updated_at": "2025-07-01T19:02:23.221Z",
"initial_block_text": "string",
"node": 0
}
]
Upload a document
POST /documents/
Uploads a document with optional metadata and associates it to a node. The processing configuration can be set in three ways:
- Manual Configuration: Provide individual processing parameters
- Ingestion Config: Use predefined settings via
ingestion_config_id - Hybrid: Combine an Ingestion Config with custom parameter overrides
When using an ingestion_config_id, the explicitly provided parameters in the request take precedence over the Ingestion Config settings.
Request body (formData)
Document Source (One required)
You must provide exactly one of the following document sources:
file (file, Optional)
Document file to upload. Supported formats include: PDF, DOCX, TXT, Markdown, LaTeX, and various media files.
url (string, Optional)
URL to fetch the document from. The system will download and process the content.
texts (string, Optional)
Raw text content to be processed as a document.
Information and Configuration
name (string) Required
Name of the document. For file uploads, this should match the original filename including the extension (e.g., "document.pdf").
doc_type (string, Optional)
Type of the document. The system can automatically detect the type based on the file format.
Default: Text Document
Enum values:
Video- Video files and multimedia contentLatex Slideshow- LaTeX presentation filesPDF Slideshow- PDF presentation documentsLatex Document- LaTeX document filesText Document- Plain text and general documentsWebpage- Web page content and HTML filesTranscription- Audio/video transcription contentMarkdown- Markdown formatted documents
metadata (string, Optional)
Additional metadata in JSON array format. Each metadata entry can include configuration options:
[
{"key": "author", "value": "John Doe", "metadata_config": "3"},
{"key": "category", "value": "research"}
]
description (string, Optional)
Human-readable description of the document content and purpose. This description will be included in every text block/chunk generated from the document during processing.
ingestion_config_id (integer, Optional)
ID of the Ingestion Configuration to use for processing this document. When provided:
- Applies predefined processing settings
- Makes
node_idoptional if the config specifies a default node - Individual parameters in the request can still override the config settings
node_id (integer)
ID of the node to associate the document with.
*Required unless using an Ingestion Config that specifies a default node.
chunk_overlap (integer, Optional)
Number of overlapping characters between text chunks.
Default: 0
max_size_block (integer, Optional)
Maximum size of each text chunk in characters.
Default: 1500
separators (string, Optional)
Custom text separators for chunking logic. Use specific delimiters to control how text is split.
additional_prompt_instructions (string, Optional)
Additional instructions for AI processing of the document content.
pdf_parsing_mode (string, Optional)
PDF parsing strategy to use.
Default: both
Enum values: manual, OpenAI, both
ocr (boolean, Optional)
Enable Optical Character Recognition for image-based content.
Default: false
images_uuid (string, Optional)
UUID for associated images when processing documents with visual content.
preview (boolean, Optional)
Return a preview of the processed content without full processing.
Default: false
assign_paths_as_metadata (boolean, Optional)
Automatically assign file paths as metadata for organizational purposes.
Default: false
Returns
A Document object containing the uploaded document information.
Status Code
200 OK: Document uploaded (with preview).
201 Created: Document successfully created.
400 Bad Request: Invalid input.
404 Not Found: Node not found.
Response example
{
"id": 0,
"metadata": [
{
"key": "autor",
"values": [
"Juan"
],
"metadata_config": 1
}
],
"node_id": 0,
"name": "string",
"doc_type": "Video",
"processing_status": "CREATED",
"processing_error_details": "string",
"editable": true,
"created_at": "2025-07-01T20:46:04.207Z",
"updated_at": "2025-07-01T20:46:04.207Z",
"initial_block_text": "string",
"node": 0
}
Get all document types
GET /documents/doc_types/
Retrieves a list of all supported document types.
Returns
An array of available document types (as strings).
Status Code
200 OK: List of document types returned successfully.
Get document by ID
GET /documents/{id}/
Retrieves the details of a specific document by its ID.
Path parameters
id (string) Required
:
The unique identifier of the document.
Returns
A Document object with the document details.
Status Code
200 OK: Document retrieved successfully.
404 Not Found: No document with the given ID exists.
Response example
{
"id": 0,
"metadata": "string",
"node_id": [
"string"
],
"name": "string",
"doc_type": "Video",
"processing_status": "CREATED",
"processing_error_details": "string",
"created_at": "2025-07-01T19:06:58.483Z",
"updated_at": "2025-07-01T19:06:58.483Z",
"initial_block_text": "string",
"node": 0
}
Update document by ID
PUT /documents/{id}/
Updates a document with optional metadata to a node. Requires the full set of fields.
Path parameters
id (string) Required
:
The unique identifier of the document.
Request body (formData)
file (file, Optional):
The new document file to upload.
url (string, Optional):
URL to fetch the document content from.
texts (string, Optional):
Raw text content.
name (string) Required
:
The name of the document.
doc_type (string, Optional):
Document type. Default: Text Document.
metadata (string, Optional):
Metadata as string (usually JSON).
description (string, Optional):
Document description.
chunk_overlap (integer, Optional):
Default: 0
preview (boolean, Optional):
Default: false
max_size_block (integer, Optional):
Default: 1500
separators (string, Optional):
Text separators for chunking.
additional_prompt_instructions (string, Optional):
Additional processing instructions.
assign_paths_as_metadata (boolean, Optional):
Default: false
pdf_parsing_mode (string, Optional):
Default: both. Possible values: manual, OpenAI, both
images_uuid (string, Optional):
UUID for associated images.
ocr (boolean, Optional):
Default: false
nodes_ids (string, Optional):
Node IDs to associate with the document.
Returns
A Documents object with updated information.
Status Code
200 OK: Document updated successfully.
400 Bad Request: The request is invalid.
404 Not Found: No document with the given ID exists.
Response example
{
"id": 0,
"metadata": "string",
"node_id": [
"string"
],
"name": "string",
"doc_type": "Video",
"processing_status": "CREATED",
"processing_error_details": "string",
"created_at": "2025-07-01T19:06:58.483Z",
"updated_at": "2025-07-01T19:06:58.483Z",
"initial_block_text": "string",
"node": 0
}
Delete document by ID
DELETE /documents/{id}/
Deletes an existing document by its ID.
Path parameters
id (string) Required
:
The unique identifier of the document to delete.
Status Code
204 No Content: Document successfully deleted.
404 Not Found: Document with the given ID does not exist.
Create a block for a document
POST /documents/{id}/blocks/
Creates a new block associated with the specified document.
Path parameters
id (string) Required
:
The ID of the document to which the block will be added.
Request body
A JSON object matching the BlockInput model:
Returns
A BlockInput object containing the created block.
Status Code
201 Created: Block successfully created.
Response example
{
"id": 0,
"metadata": {},
"text": "string",
"document_index": 2147483647,
"page_num": 2147483647,
"created_at": "2025-07-01T19:15:09.268Z",
"updated_at": "2025-07-01T19:15:09.268Z",
"initial_block_text": "string"
}
Delete blocks from a document
DELETE /documents/{id}/blocks/
Deletes multiple blocks from a specific document.
Path parameters
id (string) Required
:
The ID of the document from which blocks will be deleted.
Request body
A JSON object matching the BlocksIds model:
Status Code
200 OK: Blocks successfully deleted.
400 Bad Request: Invalid input.
404 Not Found: Document with given ID not found.
Get metadata for a document
GET /documents/{id}/metadata/
Retrieves all metadata associated with a specific document.
Path parameters
id (string) Required
:
The unique identifier of the document.
Returns
A Metadata object containing a list of metadata items.
Status Code
200 OK: Metadata successfully retrieved.
404 Not Found: Document not found.
Response example
{
"metadata": [
{
"key": "string",
"values": [
"string"
],
"metadata_config": 0
}
]
}
Add metadata to a document
POST /documents/{id}/metadata/
Adds one or more metadata entries to the specified document.
Path parameters
id (string) Required
:
The unique identifier of the document.
Request body
A JSON object matching the Metadata model.
Status Code
201 Created: Metadata successfully added.
400 Bad Request: Invalid metadata structure.
404 Not Found: Document with given ID not found.
Replace document metadata
PATCH /documents/{id}/metadata/
Replaces all the metadata of the document with the received JSON.
Deletes the metadata that is not in the received JSON.
Creates the new metadata that is not in the received JSON.
Updates the metadata that is in the received JSON.
The metadata config is optional. If it is not provided, the default metadata (None) config is used.
Path parameters
id (string) Required
:
The ID of the document whose metadata is to be updated.
Request body
A JSON object matching the Metadata model.
Status Code
200 OK: Metadata successfully updated.
400 Bad Request: Invalid input data.
404 Not Found: Document not found.