Dataset
Create Dataset
Upload and embed a new dataset into your knowledgebase
POST
Create Dataset
Creates and embeds a new dataset into your specified knowledgebase.
Upload Dataset
Path Parameters
The ID of the knowledgebase to add the dataset to
Headers
Your project API key for authentication
Request Body
The request should be sent as multipart/form-data
with the following field:
The dataset file to be uploaded and embedded
Example request using curl:
Response
A successful request will return a 201 status code indicating the dataset was created successfully.
Processing
When a dataset is uploaded:
- The file is stored securely
- The content is chunked into manageable segments
- Each chunk is embedded using the knowledgebase’s configured embedding model
- The embeddings are stored for future querying
Supported File Types
The following file extensions are supported:
- PDF (.pdf)
- Text (.txt)
Error Responses
Status Code | Description |
---|---|
400 | Invalid request or unsupported file type |
401 | Invalid API key |
404 | Knowledgebase not found |
413 | File too large |
500 | Internal server error |
Usage Notes
- Large files may take longer to process due to the embedding process
- The maximum file size limit is 10MB
- Files are processed asynchronously - use the Get Dataset endpoint to check processing status
- Each dataset is automatically split into chunks for optimal retrieval