Data Operations
Upload Vector Data
Upload pre-computed vector embeddings to a vector namespace for high-performance similarity search.
POST
Overview
Upload pre-computed vector embeddings to a vector namespace for high-performance similarity search. This endpoint is ideal when you have your own embeddings or want to use specific embedding models.Vectors must match the exact dimension specified when the namespace was created. All vectors in a batch must have the same dimension.
Authentication
Your API key for authentication
Must be
application/jsonPath Parameters
Name of the vector namespace to upload vectors to
Body Parameters
Array of vector objects to upload
Vector Object
Unique identifier for the vector.
Array of numbers representing the vector embedding
Optional original text that generated this vector
Optional metadata fields for filtering and organization. Any additional fields beyond id, vector, and text are treated as metadata.
Metadata:
- All key-value pairs other than
idandvectorare considered as metadata - Recommended metadata is
text(optional) to store the original text that generated this vector - You can add any additional metadata fields as key-value pairs according to your preference for filtering and organization
Response Fields
Success Response
Status of the upload (“success” for successful uploads)
Human-readable confirmation message
Unique identifier for tracking this upload batch
Name of the namespace where vectors were uploaded
Number of vectors successfully processed
Current status: “completed” (vectors process immediately)
Array of uploaded vector status objects
Vector Status Object
Vector identifier
Processing status: “completed” or “failed”
Dimension of the uploaded vector
ISO 8601 timestamp when vector was uploaded
Vector Requirements
Dimension Match
Must match namespace dimension exactly
Common: 384, 768, 1536, 3072
Value Range
Normalized vectors preferred
Range: -1.0 to 1.0 (typical)
Batch Size
Max: 1000 vectors per request
Recommended: 100-500 for optimal performance
Precision
Float32 precision
Up to 7 decimal places
Dimension Guidelines
Common Embedding Models
Common Embedding Models
OpenAI text-embedding-3-large: 3072 dimensions
OpenAI text-embedding-3-small: 1536 dimensions
OpenAI text-embedding-ada-002: 1536 dimensions
Sentence-BERT: 384 or 768 dimensions
Universal Sentence Encoder: 512 dimensions
Custom Embeddings
Custom Embeddings
- Ensure consistent preprocessing across all vectors
- Normalize vectors for better similarity calculations
- Use the same model/settings for all vectors in a namespace
- Document your embedding generation process
Quality Considerations
Quality Considerations
- Higher dimensions generally capture more semantic information
- Ensure vectors represent meaningful semantic content
- Consider domain-specific fine-tuned models for specialized content
- Test similarity search quality with sample queries
Processing Pipeline
Best Practices
Vector Quality
Vector Quality
- Use high-quality, domain-appropriate embedding models
- Normalize vectors to unit length for cosine similarity
- Ensure consistent preprocessing and tokenization
- Test with sample searches before large uploads
Batch Optimization
Batch Optimization
- Upload 100-500 vectors per request for best performance
- Use meaningful IDs for easier management and updates
- Include original text when possible for result display
- Group related vectors in single uploads
Metadata Strategy
Metadata Strategy
- Include filterable metadata for refined searches
- Store embedding model information for reference
- Add timestamps and source information
- Consider access control metadata
Use Cases
- Semantic Search: Build powerful semantic search over documents
- Recommendation Systems: Find similar products, content, or users
- Content Discovery: Enable “more like this” functionality
- Duplicate Detection: Identify similar or duplicate content
- Clustering & Analysis: Group similar items for analysis
- RAG Applications: Retrieval-augmented generation for AI applications
Related Endpoints
- Search - Search uploaded vector embeddings
- Get Documents - Retrieve vector information
- Delete Data - Remove uploaded vectors
- Create Namespace - Create vector namespaces for uploads