Request Body
Index Types
IVFFlat (Recommended)
Suitable for applications requiring high recall with moderate memory usage:IVF
Ideal for large-scale datasets where fast retrieval is prioritized:IVFPQ
Product Quantization compresses embeddings, balancing memory use and recall:Distance Metrics
"euclidean"
: Euclidean distance"cosine"
: Cosine similarity"squared_euclidean"
: Squared Euclidean distance
Response
Exceptions
401
: Authentication failed (invalid API key)409
: Index name already exists422
: Invalid request parameters500
: Internal server error
Example Usage
With Auto-Embedding
When
embedding_model
is specified:- The
dimension
parameter inindex_config
is optional - The entire
index_config
object is optional (defaults to IVFFlat with auto-detected dimension) - The index will automatically generate embeddings for text content during upsert operations