Parameters
The identifier of the multimodal embedding model to use.Available models:
voyage-multimodal-3- Third generation multimodal model
Returns
An image embedding model instance that implements the AI SDK’s
EmbeddingModelV3 interface.The model identifier passed during creation
The provider identifier:
"voyage.image.embedding"Maximum number of inputs per API call:
128Whether parallel calls are supported:
falseInput types
The image embedding model acceptsImageEmbeddingInput which can be:
- Single image:
string- A single image URL or base64-encoded image - Multiple images:
string[]- Array of images combined into one embedding - Object format:
{ image: string | string[] }- Alternative format with explicit image property
Image formats
Images can be provided as:- URL:
https://example.com/image.jpg(must have image extension: .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg) - Base64:
data:image/jpeg;base64,/9j/4AAQSkZJRg...(data URI with base64 encoding)
Usage examples
Generate single image embedding
Embed a single image to generate one embedding vector.Generate multiple image embeddings
Embed multiple images to generate separate embedding vectors.Use base64-encoded images
You can embed images encoded as base64 data URIs.Use object format
You can use the object format with explicit image property.Combine multiple images into one embedding
You can combine multiple images into a single embedding by passing an array. This is useful for representing related images as a single vector.Multiple embeddings with multiple images
Generate multiple embeddings, each combining multiple images.Use provider options
You can customize the embedding behavior using provider-specific options.Provider options
You can pass Voyage-specific options through theproviderOptions parameter:
The input type for the embeddings. Defaults to
"query".When specified, Voyage automatically prepends a prompt to your inputs before vectorizing them, creating vectors more tailored for retrieval/search tasks.query: Prepends “Represent the query for retrieving supporting documents: ”document: Prepends “Represent the document for retrieval: ”
The data type for the resulting output embeddings.If not specified (defaults to null), the embeddings are represented as a list of floating-point numbers.If
'base64', the embeddings are represented as a Base64-encoded NumPy array of single-precision floats.Whether to truncate the input to fit within the context length. Defaults to
true.