Encrypted Index
Upsert Vectors
POST
Upsert Vectors
Add new vectors or update existing ones in the encrypted index.
You can get an API key from the CyborgDB Admin Dashboard. For more info, follow this guide.
With Auto-Training Triggered:
With Training Check Warning:
With Metadata:
Auto-Generated Embeddings:
Batch Upsert:
Authentication
Required - API key viaX-API-Key header:
Request Body
Response
Standard Success Response:When the number of vectors in an index exceeds the automatic training threshold, the upsert response will include
training_triggered and training_message fields. Training happens asynchronously in the background.In rare cases where the training check encounters an error but the upsert operation itself succeeds, a warning field will be included instead. The vectors are still successfully upserted in this scenario.Exceptions
401: Authentication failed (invalid API key) or wrongindex_keyon SDK-supplied indexes — see error model404: Index not found422: Invalid request parameters or vector dimensions500: Internal server error
Example Usage
Basic Upsert:When
embedding_model is configured for the index, the vector parameter becomes optional. If provided, it will be used directly; if omitted, a vector will be auto-generated from the contents field.