Skip to main content
POST
Upsert Vectors
Add new vectors or update existing ones in the encrypted index.

Authentication

Required - API key via X-API-Key header:
You can get an API key from the CyborgDB Admin Dashboard. For more info, follow this guide.

Request Body

Response

Exceptions

  • 401: Authentication failed (invalid API key)
  • 404: Index not found
  • 422: Invalid request parameters or vector dimensions
  • 500: Internal server error

Example Usage

Basic Upsert:
With Metadata:
Auto-Generated Embeddings:
Batch 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.
For large datasets, use batch upserts with multiple items in a single request to improve performance and reduce network overhead.