Skip to main content

Embed queries and text

zembed-1 is the default embedding model used in zsearch, ZeroEntropy’s search engine. You can also call the embedding model directly and plug it into the vector database of your choice using the /models/embed endpoint or directly through the SDKs.

Compute similarity

Use cosine similarity to rank documents by relevance to the query.

Configuring embedding parameters

You can customize the embedding output with additional parameters:
  • dimensions: Output dimensionality. For zembed-1, the available options are: 2560 (default), 1280, 640, 320, 160, 80, 40. Lower dimensions reduce storage cost at the expense of accuracy.
  • encoding_format: "float" (default) or "base64". Base64 is significantly more efficient for transfer.
  • latency: "fast" for subsecond inference, "slow" for higher throughput. Omit to let the API choose automatically.
The embedding will return a list of floats (or a base64 string) that represent the chunk of text embedded. You can read more about available embedding models in the Models section. You can read more about how to pick the right parameters, such as embedding size, on our blog.