Skip to main content
POST
This endpoint allows you to upload a document to an assistant’s knowledge base for Retrieval-Augmented Generation (RAG). The document will be processed, chunked, and stored as embeddings in a vector database. The request must be sent as multipart/form-data.

Path Parameters

  • assistant_id (string, required): The unique identifier of the assistant to whom the document will be added.

Form Data

  • file (file, required): The document to upload. Supported file types include .txt, .pdf, .md, and .docx.

Response

A successful request will immediately return a document object with a processing status. The document will be processed in the background. You can check the status later using the Get Document Status endpoint.
Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

assistant_id
integer
required

Body

multipart/form-data
file
file
required
name
string | null
category
string | null
tags
string | null

Response

Successful Response