Create Index
Create a new RAG index by uploading a document.
Description
The Create Index
endpoint allows you to create a new searchable index by uploading a document. Supported file types include PDF, DOC, DOCX, PPT, PPTX with max file size of 20MB.
Caution
Create Index
method is an async process and our server will return with a task_id
and check_status
URL to check the status of your uploaded file.
We recommend using our webhooks
to receive completed index_id or use our polling methods to wait till completion.
HTTP Request
POST /index/create
Authentication
All requests must include an Authorization
header with a valid API key.
Headers
Key | Value |
---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | multipart/form-data |
Request Body
- document: The file to upload.
Form Data
Field | Type | Description |
---|---|---|
document | file (binary) | The document file to upload. |
Request Example
Response
Success
Status Code: 200 OK
Body:
Note
The task_id
is a unique identifier for the index creation task. Use the check_status
URL to monitor the progress of the task. Please note that the check_status
URL will return the index_id once the task is completed.
And this endpoint is secured by default, hence you need to pass the Authorization
header with the API key.
Need Help?
- Join our Discord Community
- Contact Support