Parameters
VectorItem Structure
EachVectorItem must contain an id and may optionally include vector, contents, and metadata:
Returns
Promise<SuccessResponseModel>: A Promise that resolves to a success response object containing the operation status and message with the count of upserted vectors.
Exceptions
Error
Error
- Throws if the API request fails due to network connectivity issues.
- Throws if authentication fails (invalid API key).
- Throws if the encryption key is invalid for the specified index.
- Throws if there are internal server errors preventing the upsert.
Validation Errors
Validation Errors
- Throws if the
itemsarray is empty or contains invalid data. - Throws if vector dimensions don’t match the index configuration.
- Throws if required fields are missing from vector items.
- Throws if item IDs contain invalid characters or are too long.