Skip to main content
POST
Upload Document

Request

Uploads a document to a dataset. Supports text content, PDFs, images, and other file types.

Path Parameters

string
required
The dataset to upload to

Headers

string
required
Bearer token for authentication

Body (JSON Upload)

For text content, use JSON:
string
required
Text content to index
object
Custom metadata (title, category, tags, etc.)

Body (File Upload)

For files, use multipart/form-data:
file
required
File to upload (PDF, image, text, etc.)
string
JSON-encoded metadata object

Response

string
Unique document identifier
string
Parent dataset ID
string
Original filename (for file uploads)
integer
Document size in bytes
string
Processing status: processing, ready, failed
integer
Number of searchable chunks (available when status: ready)
string
ISO 8601 creation timestamp
object
Document metadata

Examples

Text Upload

cURL
Python

File Upload

cURL
Python

Response

Processing

Documents are processed asynchronously:
  1. Upload - File received and stored
  2. Extraction - Text extracted from file
  3. Chunking - Content split into searchable segments
  4. Embedding - Vector embeddings generated
  5. Indexing - Added to search index
Processing typically takes 1-30 seconds depending on document size.

Supported File Types

  • Text: .txt, .md, .csv
  • Documents: .pdf, .docx, .pptx
  • Images: .jpg, .png (OCR applied)
  • Code: .py, .js, .java, etc.
  • Data: .json, .xml, .yaml

Limits

  • Max file size: 10MB
  • Max content length: 1M characters
  • Max 10,000 documents per dataset

Notes

  • Set title in metadata for better search results
  • Use category and tags for filtering
  • Custom metadata is searchable
  • Duplicate content is allowed