Skip to main content
CyborgDB Service uses a single IVF index type; there are no separate IVFFlat, IVFPQ, or IVFSQ types and no index_config argument. Configuration is expressed as flat parameters on create_index.
CyborgDB Service stores every encrypted index as an inverted-file (IVF) index whose data is persisted by the service’s configured storage backend (disk or s3). The four knobs you control at create time are: Two more parameters control key management — they are mutually exclusive, and exactly one must be supplied: See KMS & BYOK for the registry schema and Managing Encryption Keys for the SDK-supplied path.

Distance metric

Python SDK
TypeScript SDK
Go SDK
cURL
Supported values:
  • euclidean — L2 distance. Default if omitted.
  • squared_euclidean — L2 without the square root; faster, ordering identical to euclidean.
  • cosine — cosine distance. Use with normalized vectors.

storage_precision: from float32 to TurboQuant

storage_precision selects the dtype used for the on-disk rerank vectors. Reranking happens after IVF candidate retrieval to recover recall; storing rerank vectors at lower precision shrinks the on-disk footprint with a small recall trade-off.
Python SDK
TypeScript SDK
Go SDK

Automatic embeddings (embedding_model)

Pass a supported embedding model name and the server will embed text contents server-side on upsert and query. When embedding_model is set, dimension is inferred from the model and can be omitted.
Python SDK
TypeScript SDK
Go SDK
Embedding models are built into the service — no extra packages are required. List the supported models and their dimensions with GET /v1/embedding-models.

Training the index

The index needs to be trained once it has enough vectors. By default, the service trains it automatically once it holds more than 65,536 vectors and retrains it as it grows (see How automatic training works) — most callers do not need to call train() explicitly. See Train an Encrypted Index for the manual-training path and the tuning knobs (n_lists, batch_size, max_iters, tolerance, max_memory).

API reference

REST API Reference

POST /v1/indexes/create

Python SDK Reference

Client.create_index() in Python

JS/TS SDK Reference

Client.createIndex() in JavaScript/TypeScript

Go SDK Reference

Client.CreateIndex() in Go