v4

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-13216144508.7 KB
kb

Ingest

Upload and ingest a document into the knowledge base.

Args: collection: Target collection name. If not provided, uses file name. file: The document file to upload and process. parse_method: Parser used during ingestion. chunk_strategy: Strategy for chunking the document. chunk_size: Target chunk size in characters. chunk_overlap: Overlap between consecutive chunks. separators: Optional JSON array of custom chunk separators (recursive only). embedding_model_id: Embedding model ID from model hub. embedding_batch_size: Batch size for embedding operations. max_retries: Maximum retry attempts for failures. retry_delay: Delay between retry attempts in seconds.

post/api/kb/ingest

Response

Successful Response

statusstring required

Pipeline status: success|error|partial

doc_idstring nullable

Document identifier produced by register_document

parse_hashstring nullable

Parse hash produced during parse_document step

chunk_countinteger

Number of chunks created; must be non-negative

embedding_countinteger

Number of embeddings generated; must be non-negative

vector_countinteger

Number of vectors written to storage; must be non-negative

failed_stepstring nullable

Pipeline step where failure occurred, if any

messagestring required

Human-readable summary of pipeline result

warningsstring[]

Non-fatal warnings encountered

file_idstring nullable

Uploaded file ID for preview/download via /api/files (when ingest registers the file)