v5
latestOpenAPI 3.1.02026-08-081,0211,3082.1 MBKnowledge Bases V2
Upload With Kb Creation
Create a new knowledge base with either file upload or markdown content.
This endpoint supports two modes:
- File Upload: Provide 'file' parameter with document (PDF, DOCX, MD, TXT)
- Markdown Content: Provide 'markdown_content' parameter with markdown text
Process:
- Validates and uploads content to S3
- Creates a new knowledge base
- Creates a document record (version 1)
- 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