Upload files to a Vector Store
Upload file content to Vector Store with batch operations
Upload files to a vector store.
The ID of the vector store.
The API key for authentication.
The files to upload.
Files uploaded successfully.
Some files failed to upload.
Example Requests
curl -X POST \
https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/upload \
-H "x-api-key: YOUR_API_KEY" \
-F "files=@/path/to/document1.pdf" \
-F "files=@/path/to/document2.docx"const uploadFiles = async (vectorStoreId, files) => {
const formData = new FormData();
// Add multiple files to the form data
for (const file of files) {
formData.append('files', file);
}
const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/upload`, {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY'
// Note: Do not set Content-Type header, it will be set automatically with the correct boundary
},
body: formData
});
const data = await response.json();
console.log(data);
};
// Example usage with file input element
const fileInput = document.getElementById('fileInput');
uploadFiles('vs_abc123', fileInput.files);Path Parameters
vector-store-id
string
Required. The ID of the vector store to upload files to.
Request Body
This endpoint accepts a multipart/form-data request with one or more files in the files field.
Response Format
If some files fail to upload, they will be listed in the errors array:
Authentication
This endpoint requires authentication using an API key in the x-api-key header.
Supported File Formats
PDF (
.pdf)Microsoft Word (
.doc,.docx)Microsoft Excel (
.xls,.xlsx)Microsoft PowerPoint (
.ppt,.pptx)Text files (
.txt)Markdown (
.md)JSON (
.json)HTML (
.html,.htm)
File Size Limits
Individual file size limit: 50MB
Total request size limit: 100MB
Maximum number of files per request: 20
Error Responses
400
Bad Request - No files provided or invalid request format
401
Unauthorized - Invalid or missing API key
404
Not Found - Vector Store not found
413
Payload Too Large - Files exceed size limit
415
Unsupported Media Type - File format not supported
500
Internal Server Error
207
Multi-Status - Some files were uploaded successfully, but others failed
Processing Status
Files are initially accepted with a status of processing. You can check the processing status of the documents using the Get a List of Documents in a Vector Store endpoint. Final status will be one of:
done: Document was successfully processederror: An error occurred during processingprocessing: Document is still being processed
Processing time depends on file size and complexity. Typical processing time is between 30 seconds to 5 minutes per document.
Batch Operations
For efficiently uploading multiple files to your Vector Store, Rememberizer supports batch operations. This approach helps optimize performance when dealing with large numbers of documents.
Batch Upload Implementation
Batch Upload Best Practices
To optimize performance and reliability when uploading large volumes of files:
Manage Batch Size: Keep batch sizes between 5-10 files for optimal performance. Too many files in a single request increases the risk of timeouts.
Implement Rate Limiting: Add delays between batches (2-3 seconds recommended) to avoid hitting API rate limits.
Add Error Retry Logic: For production systems, implement retry logic for failed uploads with exponential backoff.
Validate File Types: Pre-filter files to ensure they're supported types before attempting upload.
Monitor Batch Progress: For user-facing applications, provide progress feedback on batch operations.
Handle Partial Success: The API may return a 207 status code for partial success. Always check individual document statuses.
Clean Up Resources: Ensure all file handles are properly closed, especially when errors occur.
Parallelize Wisely: For very large uploads (thousands of files), consider multiple concurrent batch processes targeting different vector stores, then combine results later if needed.
Implement Checksums: For critical data, verify file integrity before and after upload with checksums.
Log Comprehensive Results: Maintain detailed logs of all upload operations for troubleshooting.
By following these best practices, you can efficiently manage large-scale document ingestion into your vector stores.
Last updated