Embeddings

An embedding represents text as a numeric vector. Compare vectors to search by meaning, group related text, or find near-duplicates.

The Embeddings block accepts a string or list of strings and returns one vector per input in the same order. Choose OpenAI, Google Gemini, Cohere, Mistral, OpenRouter, or an embedding model on your Ollama server. Dimension and task-type controls appear only for supported models.

Input and model limits

Compare vectors from the same model at the same size. Changing either requires re-embedding the text you intend to compare.

The block accepts at most 1,000 non-empty texts and 1,000,000 total characters per call. Provider model limits also apply. Text that exceeds the selected model's token limit is truncated with a server-log warning; chunk long documents before embedding when the full content matters.

Ollama

Ollama requires no API key and adds no hosted embedding-provider charge. Your deployment's workflow billing still applies where enabled. Configure OLLAMA_URL to point to a server Sim can reach. Self-hosted Sim can use its local default; hosted Sim requires an explicitly configured server and returns an empty model list when none is configured.

The model picker reads installed models and filters out those reporting no embedding capability. When available, it shows the reported vector width. Older Ollama servers may list chat models or omit widths, but execution still requires an embedding-capable model with a reported width. Upgrade Ollama or select another model if width validation fails.

Ollama has no task-type or dimension control in this block. Sim uses the model's reported width; support for dimension overrides varies across Ollama versions and models.

Knowledge base embeddings

Knowledge bases embed separately. Each base fixes an embedding model and vector width at creation from the supported knowledge base catalog. Use this block when a workflow needs to generate vectors itself.

Use the block

Turn text into embedding vectors for semantic search, clustering, and similarity. Supports OpenAI, OpenRouter, Google Gemini, Cohere, and Mistral embedding models, plus embedding models on a self-hosted Ollama.

Actions

OpenAI Embeddings

Generate embeddings from text using OpenAI's embedding models

Input

ParameterTypeRequiredDescription
inputstringYesText to embed, or an array of texts to embed in one call
modelstringNoEmbedding model to use
taskTypestringNoWhat the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering
dimensionsnumberNoOutput dimensions, when the model supports truncation. Defaults to native.
apiKeystringYesAPI key for the selected embedding provider

Output

ParameterTypeDescription
embeddingsjsonGenerated embedding vectors, one per input, in input order
modelstringModel used
providerstringProvider used
dimensionsnumberDimensionality of each returned vector
usagejsonToken usage
↳ prompt_tokensnumberTokens in the input
↳ total_tokensnumberTotal tokens billed

OpenRouter Embeddings

Generate embeddings through OpenRouter

Input

ParameterTypeRequiredDescription
inputstringYesText to embed, or an array of texts to embed in one call
modelstringNoEmbedding model to use
taskTypestringNoWhat the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering
dimensionsnumberNoOutput dimensions, when the model supports truncation. Defaults to native.
apiKeystringYesAPI key for the selected embedding provider

Output

ParameterTypeDescription
embeddingsjsonGenerated embedding vectors, one per input, in input order
modelstringModel used
providerstringProvider used
dimensionsnumberDimensionality of each returned vector
usagejsonToken usage
↳ prompt_tokensnumberTokens in the input
↳ total_tokensnumberTotal tokens billed

Gemini Embeddings

Generate embeddings from text using Google's Gemini embedding models

Input

ParameterTypeRequiredDescription
inputstringYesText to embed, or an array of texts to embed in one call
modelstringNoEmbedding model to use
taskTypestringNoWhat the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering
dimensionsnumberNoOutput dimensions, when the model supports truncation. Defaults to native.
apiKeystringYesAPI key for the selected embedding provider

Output

ParameterTypeDescription
embeddingsjsonGenerated embedding vectors, one per input, in input order
modelstringModel used
providerstringProvider used
dimensionsnumberDimensionality of each returned vector
usagejsonToken usage
↳ prompt_tokensnumberTokens in the input
↳ total_tokensnumberTotal tokens billed

Cohere Embeddings

Generate embeddings from text using Cohere's embedding models

Input

ParameterTypeRequiredDescription
inputstringYesText to embed, or an array of texts to embed in one call
modelstringNoEmbedding model to use
taskTypestringNoWhat the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering
dimensionsnumberNoOutput dimensions, when the model supports truncation. Defaults to native.
apiKeystringYesAPI key for the selected embedding provider

Output

ParameterTypeDescription
embeddingsjsonGenerated embedding vectors, one per input, in input order
modelstringModel used
providerstringProvider used
dimensionsnumberDimensionality of each returned vector
usagejsonToken usage
↳ prompt_tokensnumberTokens in the input
↳ total_tokensnumberTotal tokens billed

Mistral Embeddings

Generate embeddings from text using Mistral's embedding models

Input

ParameterTypeRequiredDescription
inputstringYesText to embed, or an array of texts to embed in one call
modelstringNoEmbedding model to use
taskTypestringNoWhat the embedding is for, when the model supports task conditioning: document, query, similarity, classification, or clustering
dimensionsnumberNoOutput dimensions, when the model supports truncation. Defaults to native.
apiKeystringYesAPI key for the selected embedding provider

Output

ParameterTypeDescription
embeddingsjsonGenerated embedding vectors, one per input, in input order
modelstringModel used
providerstringProvider used
dimensionsnumberDimensionality of each returned vector
usagejsonToken usage
↳ prompt_tokensnumberTokens in the input
↳ total_tokensnumberTotal tokens billed

Ollama Embeddings

Generate embeddings on a self-hosted Ollama server

Input

ParameterTypeRequiredDescription
inputstringYesText to embed, or an array of texts to embed in one call
modelstringYesEmbedding model pulled on the configured Ollama server

Output

ParameterTypeDescription
embeddingsjsonGenerated embedding vectors, one per input, in input order
modelstringModel used
providerstringProvider used
dimensionsnumberDimensionality of each returned vector
usagejsonToken usage
↳ prompt_tokensnumberTokens in the input
↳ total_tokensnumberTotal tokens billed