Ingest a document or file
Ingest
Ingest a document or file
Upload a file (PDF, , CSV, EPUB, PPTX, TXT) or provide a URL to get a file_id.
The file_id returned from this endpoint is required for all chat operations.
URL Format:
/source/v1/api/document— upload any supported document/source/v1/api/document/{type}— optionally specify a type suffix (e.g.,pdf, “,xlsx,csv,epub,pptx,txt)
Examples:
POST /source/v1/api/documentPOST /source/v1/api/document/pdfPOST /source/v1/api/document/xlsxPOST /source/v1/api/document/csvPOST /source/v1/api/document/epubPOST /source/v1/api/document/pptxPOST /source/v1/api/document/txt
Supported file types:
- PDF (.pdf)
- Excel/CSV (.xlsx, .xls, .csv)
- EPUB (.epub)
- PowerPoint (.pptx, .ppt)
- Text files (.txt, .rtf)
Required Headers:
Authorization: Bearer YOUR_API_KEY
Notes:
- Do not send
platform,userid,useremailfor API calls. The backend derives the user from your API key. - Choose the correct
{type}in the route (e.g.,pdf,xlsx,pptx,txt,epub) for document chat endpoints.
Example Workflow:
- Upload file or provide URL → Get
file_id - Use
file_idin appropriate/chat/v1/api/document/:typeendpoint to ask questions
POST
Ingest a document or file
