gemini-embedding-2
by google
Google's natively multimodal embedding model: text, images, video, audio and PDFs in one 3072-d space
google/gemini-embedding-2mixpeek://multimodal_extractor@v2/gemini-embedding-2Overview
Gemini Embedding 2 maps text, images, video, audio, and PDFs into a single 3072-dimensional space, so a text query can retrieve a video segment without a translation step between modalities. It supports Matryoshka representation truncation, meaning the same embedding can be stored at a shorter width without re-running the model, because the short vector is a prefix of the full one. You choose the storage and latency cost at index time rather than at model-selection time.
The widths available depend on which extractor you run it under, so check the one you are using rather than assuming a single set. `multimodal_extractor@v2` accepts 3072, 1536, or 768 and validates the value when the collection is created. `gemini_multifile_extractor@v1`, which embeds every file of an object into one vector, documents 3072, 768, or 256. `universal_extractor@v1` describes the range 256 to 3072.
On Mixpeek this runs as a managed extractor over your object storage. Set `output_dimensionality` and the collection's vector index is created at that size; an unsupported value is rejected at collection create rather than surfacing as a failed batch after the GPU work is already paid for.
We have not published our own retrieval benchmark for this model, so no scores are quoted here. For how it behaves on multi-file inputs in a real pipeline, see [Gemini Embedding 2 in Mixpeek](/blog/gemini-embedding-2-multifile). For a measured comparison of the Gemini Flash generations on metadata extraction, see our [Gemini Flash benchmark](/curated-lists/best-gemini-flash-models-for-metadata-extraction); for retrieval-side model comparisons see [multimodal embedding models](/curated-lists/best-multimodal-embedding-models), and for the storage arithmetic behind picking a width, [vector storage tiering](/guides/vector-storage-tiering).
Architecture
Natively multimodal embedding model with a 3072-dimensional output space, trained so that leading sub-vectors remain useful on their own (Matryoshka representation learning). Truncating keeps the first N dimensions and requires no re-encoding, which is what makes adaptive retrieval possible: search a shortened vector first, then rescore the shortlist at full width. Because every modality lands in the same space, cross-modal retrieval needs no separate alignment step.
Mixpeek SDK Integration
// No extractor parameter takes a Hugging Face model id (checked against
// GET /v1/discovery/extractors, which returns 13), so gemini-embedding-2 runs
// on your side and the output is upserted through POST
// /v1/namespaces/{namespace_id}/documents/upsert. On Enterprise the other
// path is to upload the weights instead: POST /v1/namespaces/{id}/models
// accepts the huggingface format and a custom plugin loads them.
const res = await fetch(
"https://api.mixpeek.com/v1/namespaces/ns_your_namespace/documents/upsert",
{
method: "POST",
headers: {
Authorization: "Bearer API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
collection_id: "col_your_collection",
documents: [
{
document_id: "asset-00412",
// The vector name has to match a vector index on the collection.
vectors: { "multimodal-embedding": yourVector },
payload: { source_key: "archive/2026/asset-00412" },
},
],
}),
},
);
// Managed alternative, if this exact model is not the requirement:
// multimodal_extractor@v2 runs google/gemini-embedding-2
// (3072-d) over a bucket, with no inference of your own.Capabilities
- 3072-dimensional dense embeddings across text, image, video, audio and PDF
- Cross-modal retrieval in one space: a text query matches a video segment
- Matryoshka truncation to a shorter width with no re-encoding
- Adaptive retrieval: cheap first-pass search, full-width rescoring
Use Cases on Mixpeek
Performance
Storage scales linearly with the dimension you choose: 768 costs a quarter of 3072 per vector. Pick the width from your recall requirement measured on your own corpus, and confirm the widths your extractor accepts before you create the collection, because the index is sized at create and cannot be resized afterwards.
Common Pipeline Companions
Explore on Mixpeek
Compare alternatives in this category
Hand-picked tools & platforms compared
Deep-dive technical guide
See how Mixpeek runs models as extractors
Store & search embeddings at scale
Usage-based pricing for pipelines
Compare models, APIs & infrastructure
Specification
Build a pipeline with gemini-embedding-2
Add this model to a processing pipeline alongside other extractors. Combine with retrieval stages for end-to-end search.
Run it on your own data, free