Most embedding models have a single job: turn text into vectors. Feed them an image, and you need a different model. Feed them a video clip, and you need a third one. Building a RAG system over a mixed corpus of PDFs, screenshots, videos, and transcripts meant stitching together multiple models and hoping their vector spaces were compatible enough to retrieve across modalities.
Gemini Embedding 2, released in public preview on March 10, 2026, takes a different approach: a single model that maps text, images, videos, audio, and PDFs into one unified 3,072-dimensional vector space. Cross-modal similarity — comparing a natural language query against a video thumbnail or audio clip — works natively, with no conversion step.
This guide is for builders evaluating embedding models for production RAG pipelines, semantic search, or retrieval-augmented agents. Here’s what Gemini Embedding 2 actually is, how it performs, and whether it belongs in your stack.
What Gemini Embedding 2 Is
Gemini Embedding 2 is a dedicated embedding model, not a generation model. It’s not a variant of Gemini 3.x — it’s a purpose-built representation model whose output is a fixed-length vector, not a text completion.
The key architectural distinction: it’s natively multimodal. Most “multimodal embedding” models are really text embedding models that accept image inputs and convert them to text-space representations internally. Gemini Embedding 2 was trained to represent all modalities in a shared geometric space from the start. A photo of a product, a 30-second video of a process, an audio snippet, and a text description of the same thing should all map to nearby vectors.
What it embeds:
- Text (documents, queries, code)
- Images (JPEG, PNG, WebP, GIF)
- Video (MP4, MOV, AVI, WebM)
- Audio (MP3, WAV, FLAC, AAC)
- PDFs (natively — no OCR preprocessing required)
Why This Matters for RAG Builders
Traditional multimodal RAG architectures require separate pipelines per modality:
- Text → text embedding model
- Images → image captioning model → text → text embedding model (or a separate CLIP-style image encoder)
- Video → frame extraction → captioning → text → text embedding
- Audio → transcription → text → text embedding
Each conversion step introduces latency, cost, and information loss. A video frame has spatial and temporal context that a caption won’t fully capture. An audio clip has prosodic information that a transcript discards entirely.
Gemini Embedding 2 collapses this into a single API call per document. The vector you get from an image was trained to be compatible with the vector you get from a text description of that image — without your having to write the description yourself.
For practical RAG applications this means:
- PDF corpuses with embedded images and figures: embed the whole PDF, not just extracted text
- Video knowledge bases: embed video chunks directly; retrieve by natural language query
- Mixed-media datasets: one index, one embedding model, one retrieval path
Benchmarks
MTEB English v2: 68.32 — top position at launch, 5.09 points ahead of the next competitor.
MTEB Multilingual: 69.9 — top position at launch across 100+ languages.
MTEB Code: 84.0 — strong performance on code retrieval tasks.
Video Retrieval: 68.8 — specific multimodal benchmark covering natural language queries over video clips.
For context, the previous generation text-only comparison points:
| Model | MTEB English | Type | Price/1M tokens |
|---|---|---|---|
| Gemini Embedding 2 | 68.32 | Multimodal API | $0.20 |
| Qwen3-Embedding-8B | 70.58 (multilingual) | Text, OSS | $0.01 |
| Cohere Embed 4 | 65.8 | Multimodal API | $0.10 |
| OpenAI text-embedding-3-large | 64.6 | Text API | $0.13 |
| Voyage 4 | ~69+ (NDCG@10) | Text API | ~$0.06 |
A few notes on reading this table honestly:
- Qwen3-Embedding-8B beats Gemini Embedding 2 on raw MTEB Multilingual (70.58 vs 69.9) and costs 20x less, but is text-only and requires either self-hosting or a third-party inference provider.
- Cohere Embed 4 also supports multimodal input (including PDFs) with a 128K-token context window vs Gemini Embedding 2’s 8,192 — a meaningful advantage for very long documents.
- The MTEB leaderboard is updated continuously; Gemini Embedding 2 held the top position at launch but rankings shift as new models release. Check the current state at mteb.clef-initiative.eu.
Dimensions and Context Window
Dimensions: 128 to 3,072, selectable at inference time via Matryoshka Representation Learning (MRL). The model produces a full 3,072-dimensional vector that can be truncated to any smaller size while preserving most of the semantic quality.
Practical guidance:
- 3,072 — maximum quality; larger index storage and slower similarity search
- 1,536 — balanced; recommended for most production use cases
- 768 — cost-efficient; acceptable quality loss for high-volume applications
Context window: 8,192 tokens — a 4x improvement over Google’s previous embedding-001 model, and sufficient for most document chunks in a standard RAG pipeline. If you’re embedding 200-page documents whole, Cohere Embed 4’s 128K context is more appropriate.
Pricing
$0.20 per 1 million input tokens via the Gemini API.
For multimodal inputs, token counting works differently:
- Text: standard token count
- Images: Google’s Vision token calculation (roughly proportional to resolution)
- Video and audio: billed per second of media content
At $0.20/M tokens, Gemini Embedding 2 is more expensive than OpenAI text-embedding-3-large ($0.13/M) and significantly more expensive than open-source alternatives via OpenRouter (Qwen3-Embedding-8B at $0.01/M). The price premium is the cost of native multimodal capability and Google’s infrastructure guarantees.
API Access
Gemini Embedding 2 is available through two Google endpoints:
Gemini API (AI Studio) — simpler setup, suitable for prototyping and personal projects. Requires a Google account and an AI Studio API key.
Vertex AI — production-grade endpoint with SLAs, regional options, IAM integration, and VPC-SC support. Requires a Google Cloud project.
The model identifier is gemini-embedding-2 across both endpoints. Check the current Google
documentation for the latest model IDs, as Google sometimes updates these between preview and GA.
Python: Text Embedding (Gemini API)
import google.generativeai as genai
genai.configure(api_key="YOUR_GEMINI_API_KEY")
# Embed text
result = genai.embed_content(
model="models/gemini-embedding-2",
content="Explain the difference between RAG and fine-tuning",
task_type="retrieval_query", # or "retrieval_document", "semantic_similarity"
output_dimensionality=1536, # MRL: 128–3072
)
embedding = result["embedding"]
print(f"Dimensions: {len(embedding)}") # 1536
Python: Image Embedding (Gemini API)
import google.generativeai as genai
from PIL import Image
genai.configure(api_key="YOUR_GEMINI_API_KEY")
image = Image.open("product_photo.jpg")
result = genai.embed_content(
model="models/gemini-embedding-2",
content=image,
task_type="retrieval_document",
output_dimensionality=1536,
)
embedding = result["embedding"]
Python: Cross-Modal Query (Text Query vs. Image Documents)
import google.generativeai as genai
from PIL import Image
import numpy as np
genai.configure(api_key="YOUR_GEMINI_API_KEY")
# Embed a text query
query_result = genai.embed_content(
model="models/gemini-embedding-2",
content="a red sports car parked on a mountain road",
task_type="retrieval_query",
output_dimensionality=1536,
)
query_vec = np.array(query_result["embedding"])
# Embed a library of images (already indexed in practice)
images = [Image.open(f"car_{i}.jpg") for i in range(1, 4)]
doc_results = [
genai.embed_content(
model="models/gemini-embedding-2",
content=img,
task_type="retrieval_document",
output_dimensionality=1536,
)
for img in images
]
doc_vecs = np.array([r["embedding"] for r in doc_results])
# Cosine similarity
norms = np.linalg.norm(doc_vecs, axis=1, keepdims=True)
similarities = doc_vecs @ query_vec / (norms.squeeze() * np.linalg.norm(query_vec))
best_match = np.argmax(similarities)
print(f"Best match: car_{best_match + 1}.jpg (score: {similarities[best_match]:.4f})")
The critical detail: you use the same model and endpoint for queries and documents regardless of modality. The vector space is shared — a text query and an image document are directly comparable.
LangChain Integration
from langchain_google_genai import GoogleGenerativeAIEmbeddings
embeddings = GoogleGenerativeAIEmbeddings(
model="models/gemini-embedding-2",
google_api_key="YOUR_GEMINI_API_KEY",
task_type="retrieval_document",
)
# Works with any LangChain vector store (Chroma, Qdrant, Weaviate, etc.)
Gemini Embedding 2 is supported by LangChain, LlamaIndex, Haystack, Weaviate, Qdrant, and ChromaDB directly. For most frameworks, it’s a drop-in swap wherever an embedding model is configured — you change the model identifier and add your Gemini API key.
Decision Guide
Use Gemini Embedding 2 when:
- Your corpus mixes text, images, PDFs, video, or audio and you want a single embedding pipeline
- You’re already on GCP and want native Vertex AI integration with proper IAM and SLAs
- Cross-modal retrieval is a core feature — finding images from text queries or vice versa
- You want maximum MTEB English performance from a managed API without running your own inference
Use OpenAI text-embedding-3-large instead when:
- Your corpus is text-only and you want a proven, lower-cost option ($0.13/M vs $0.20/M)
- You’re on Azure OpenAI Service and want to keep billing consolidated
- You need predictable latency SLAs from a very mature production service
Use Qwen3-Embedding-8B instead when:
- Cost is primary: at $0.01/M via OpenRouter or self-hosted, it’s 20x cheaper
- MTEB multilingual performance is your main metric (70.58 vs 69.9 for Gemini Embedding 2)
- You’re comfortable with third-party inference or can host on your own GPU
- Your use case is text-only (it has no multimodal capability)
Use Cohere Embed 4 instead when:
- You need to embed very long documents (128K context vs Gemini Embedding 2’s 8K)
- You want multimodal capability but need AWS Bedrock or Azure AI hosting
- You’re processing documents that contain embedded images or tables as a primary workload
Wait before building when:
- You’re building a production system and want GA status — verify current preview/GA state in Google’s documentation before committing Gemini Embedding 2 to a production index
- Your budget can’t absorb $0.20/M at scale
Honest Caveats
- Still in public preview as of our research date (March 2026). Google has a history of updating embedding model names and versioning between preview and GA. Verify the current model identifier and GA status before building a long-lived index against it — re-embedding costs are real if the model updates.
- 8K context is a limitation. For embedding full PDF pages or long transcript chunks, you’ll hit this ceiling. Cohere Embed 4’s 128K context is a meaningful advantage for document-heavy workflows.
- MTEB rankings have shifted. Gemini Embedding 2 held the top spot at launch, but the MTEB leaderboard is active. Qwen3-Embedding-8B and Voyage 4 remain competitive; check current rankings before treating any number as settled.
- Multimodal billing is complex. Images, video, and audio are billed differently from text. Run cost projections against your specific corpus makeup before assuming $0.20/M covers it cleanly.
- We research, we don’t test. ChatForest researches and summarizes; we have not built a production RAG pipeline using Gemini Embedding 2. Verify benchmark claims against your own retrieval tasks — MTEB performance doesn’t always translate directly to domain-specific retrieval.
Researcher disclosure: This guide is based on Google’s published benchmarks, Google AI documentation, and third-party reporting as of June 15, 2026. ChatForest did not access the Gemini Embedding 2 API directly. Pricing, MTEB scores, and preview/GA status are subject to change — verify current details at ai.google.dev or cloud.google.com/vertex-ai.