Skip to main content
Creates and returns an EncryptedIndex instance based on the provided configuration.

Parameters

For more info on auto-generating embeddings, refer to Auto-Generate Embeddings.

Returns

Promise<EncryptedIndex>: A Promise that resolves to an instance of the newly created encrypted index.

Exceptions

  • Throws if the index name already exists on the server.
  • Throws if the index configuration is invalid or missing required parameters.
  • Throws if the encryption key is not exactly 32 bytes.
  • Throws if the embedding model is not supported by the server.
  • Throws if the API request fails due to network issues.
  • Throws if the server returns an HTTP error status.
  • Throws if authentication fails (invalid API key).

Example Usage

Basic IVFFlat Index Creation

IVFPQ Index with Embedding Model