Skip to main content

Embeddings

Accessing the Nomic Embedding API in the Python client.

Text Embeddings

from nomic import embed

output = embed.text(
texts=['Nomic Embedding API', '#keepAIOpen'],
model='nomic-embed-text-v1.5',
task_type='search_document'
)

print(output)

Text Embeddings with Variable Dimensions

Some models support variable output dimensions for a small trade-off in performance.

Specify a dimensionality to control the embedding size.

from nomic import embed

output = embed.text(
texts=['Nomic Embedding API', '#keepAIOpen'],
model='nomic-embed-text-v1.5',
task_type='search_document',
dimensionality=512
)

print(output)