Embeddings VoyageAI icon

Embeddings VoyageAI

Use VoyageAI's Embeddings models

Embeddings VoyageAI

AI-generated

Summary

Supplies a VoyageAI embeddings model over the ai_embedding connection for a vector store node to use. It does not process workflow items itself. The connected node calls it to embed documents or queries.

Inputs

  • modelName (required) — VoyageAI model to use (default voyage-4). Choices: voyage-4-large, voyage-4, voyage-4-lite, voyage-4-nano, voyage-code-3, voyage-finance-2, voyage-law-2, voyage-multilingual-2, and legacy voyage-3.5, voyage-3.5-lite, voyage-3-large.
  • outputDimension — Embedding size: Default (1024), 256, 512, 1024 or 2048. Shown only for voyage-4*, voyage-3.5*, voyage-3-large and voyage-code-3. Default 0 sends no dimension. The vector store must use the same dimensionality.
  • outputDtype — Quantization: float (default), int8, uint8, binary or ubinary. Shown only for models that support dimensions. 'float' is not sent to the API.
  • options.batchSize — Maximum texts per embedding request (default 128, max 1000). Batches are also capped by the model's total token limit.
  • options.inputType — None, Query or Document, as an optimization hint. Document embedding uses the selected value. Query embedding always sends 'query'.
  • options.truncation — Whether to truncate texts that exceed the context length (default true). If false, oversized inputs raise an error.
  • options.encodingFormat — float (default) or base64. 'float' is not sent to the API.
  • Credentials (voyageAiApi) (required) — Supplies the API key and an optional base URL, which defaults to https://api.voyageai.com/v1. HTTP(S) proxy environment variables are honored.

Output shape

An embeddings object on the ai_embedding output, not regular item data. embedDocuments returns an array of vectors, one per text. embedQuery returns a single vector.

Empty strings are replaced with a space before embedding. Token counts come from the VoyageAI tokenizer, and the batcher uses them to split requests. Each call is logged in the n8n execution view with its inputs and outputs. Errors are surfaced as node operation errors. embedQuery returns an empty array if the API returns no embedding. With int8, binary or base64 settings, the vector format will differ from plain float arrays, so check that your vector store is compatible.

Examples

Example 1: Index documents into a vector store for RAG

Model voyage-4, Output Dimension 1024, Input Type Document, connected to a Vector Store node's Embedding input.

Example 2: Code search embeddings with smaller vectors

Model voyage-code-3, Output Dimension 512, Output Data Type float, Batch Size 64.

Example 3: Cheaper, compact storage

Model voyage-4-lite, Output Dimension 256, Output Data Type int8, Truncate enabled.

Links

Discussion