Google Launches Gemini Embedding 2 for Production Multimodal Search Applications

GoogleGoogle

· Updated

Google's first natively multimodal embedding model, Gemini Embedding 2, is now generally available via the Gemini API and Vertex AI. The update enables developers to map text, images, audio, video, and documents into a single vector space for production-grade semantic search and clustering. This transition from preview to stable status introduces flexible vector dimensions and a new prompt-based task instruction system.

Google moved Gemini Embedding 2 to general availability, marking the stable release of its first natively multimodal embedding model. It generates embeddings (numerical representations of data) for text, images, audio, video, and PDF documents. This release follows the initial public preview and is optimized for production stability.
Input token limit
8,192 tokens
Output dimensions
128 to 3072
Video duration limit
120 seconds
Audio duration limit
180 seconds
Image limit
6 images per request
Document limit
6 PDF pages
Batch API pricing
50% discount

This update simplifies Retrieval-Augmented Generation (RAG) systems (grounding AI responses with external data) that handle diverse media. By mapping modalities into one embedding space, you can perform cross-modal searches without separate, aligned pipelines. The model also uses Matryoshka Representation Learning to allow flexible vector sizes without quality loss.

Integrate these embeddings via the Gemini API or Vertex AI. The embedding space is incompatible with previous versions, requiring a full re-embedding of data. For high-volume tasks, the Batch API offers a 50% discount. You must now use specific task prefixes in prompts instead of the legacy task_type parameter.

Google AI Developers
Google AI Developers
@googleaidevs
X

Gemini Embedding 2 is now generally available in the Gemini API and Vertex AI! Start building with our first natively multimodal embedding model, now equipped with the stability and optimizations required for production apps. https://t.co/howDTPbG1Q

283retweets2.7klikes
View on X

Still wondering? A few quick answers below.

Gemini Embedding 2 is Google's first natively multimodal embedding model. It transforms text, images, audio, video, and PDF documents into a single numerical vector space, which is a mathematical representation of data meaning. This allows for cross-modal search and clustering, enabling systems to understand semantic relationships between different types of media using one model.

Migration requires a full re-embedding of your existing data because the vector spaces between the two models are incompatible. You must also update your code to use task-specific prompt instructions, which are text prefixes that tell the model how to optimize the vector for tasks like search or classification, replacing the legacy task type parameter.

The model supports a maximum input of 8,192 tokens per request. Specific modality limits include up to 6 images, 180 seconds of audio, and 120 seconds of video. For documents, you can process up to 6 PDF pages. If you need to embed longer videos, you should chunk them into overlapping segments for individual processing.

Gemini Embedding 2 allows you to control the output dimensionality between 128 and 3072. It uses Matryoshka Representation Learning, a technique that teaches models to create high-dimensional vectors where the initial segments are also useful. The model automatically normalizes these truncated dimensions, so you can save storage space while maintaining accurate semantic similarity results.

Developers can use the Batch API, a service for processing large groups of requests at once, for high-throughput tasks where real-time latency is not required. Using the Batch API reduces the cost of generating embeddings by 50 percent. This is particularly useful for the initial re-embedding of large datasets required when migrating between incompatible models.

Every HeadsUpAI update is written based on its original source and reviewed before it's published. Read our editorial standards →

Share this update