v5

latestOpenAPI 3.1.02026-08-081,0211,3082.1 MB
Knowledge Bases V2

Upload With Kb Creation

Create a new knowledge base with either file upload or markdown content.

This endpoint supports two modes:

  1. File Upload: Provide 'file' parameter with document (PDF, DOCX, MD, TXT)
  2. Markdown Content: Provide 'markdown_content' parameter with markdown text

Process:

  1. Validates and uploads content to S3
  2. Creates a new knowledge base
  3. Creates a document record (version 1)
  4. Returns KB and document info for async processing

The document processing (chunking, vectorization) happens asynchronously via Celery.

Note: You must provide either 'file' OR 'markdown_content', but not both.

post/knowledge_bases/v2/upload

Response

Successful Response

successboolean required
knowledge_base_idinteger required
knowledge_base_public_idstring required
document_idinteger required
document_public_idstring required
namestring required
versioninteger required
processing_statusstring required
celery_task_idstring nullable
messagestring nullable