Skip to main content
POST
Add Knowledge Base Documents
Upload documents to a knowledge base by providing URLs. The documents will be downloaded, processed, and indexed for semantic search.

Path Parameters

string
required
Unique identifier of the knowledge base (UUID format)

Request Body

array
required
Array of document URLs to add to the knowledge baseSupported formats:
  • PDF documents
  • Microsoft Word (.docx, .doc)
  • Text files (.txt, .md)
  • Web pages (HTML)
  • CSV and Excel files
  • Presentations (PPTX, PPT)
  • JSON and YAML files

Response

Returns an array of created document objects:
string
Knowledge base ID
string
Unique identifier for the document (UUID) - initially null, assigned after processing completes
string
Document name (initially null)
string
URL of the document

Example Request

Example Response

Processing Flow

  1. Upload - Documents are queued for processing
  2. Download - System downloads documents from provided URLs
  3. Extract - Text content is extracted from documents
  4. Chunk - Content is split into searchable chunks
  5. Embed - Chunks are converted to vector embeddings
  6. Index - Embeddings are stored in the vector database
Processing typically takes 10-60 seconds per document depending on size.

Supported File Types

  • Documents: PDF, DOCX, DOC, TXT, MD, RTF
  • Spreadsheets: CSV, XLSX, XLS
  • Presentations: PPTX, PPT
  • Web: HTML, XML
  • Code: JSON, YAML, various programming languages

Notes

  • Documents must be publicly accessible via HTTP/HTTPS
  • Maximum file size: 50MB per document
  • The id field is null initially until the document is processed and indexed
  • The document ID is assigned after processing/indexing completes
  • Use List Documents to check processing progress
  • Duplicate URLs will create separate document entries

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

kb_id
string
required

Body

application/json

Request model for adding documents to a knowledge base.

document_urls
string[]
required

Documents URLs

Response

Successful Response

document_url
string
required

Document URL

kb_id
string | null

KB identifier

id
string | null

Document unique identifier

name
string | null

Document name