{"id":1892,"date":"2026-03-11T17:28:04","date_gmt":"2026-03-11T09:28:04","guid":{"rendered":"https:\/\/gaga.art\/blog\/?p=1892"},"modified":"2026-03-11T17:28:06","modified_gmt":"2026-03-11T09:28:06","slug":"gemini-embedding-2","status":"publish","type":"post","link":"https:\/\/gaga.art\/blog\/gemini-embedding-2\/","title":{"rendered":"Gemini Embedding 2: Google&#8217;s Multimodal AI Just Changed Search"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/03\/gemini-2-embedding-1024x577.webp\" alt=\"gemini 2 embedding\" class=\"wp-image-1893\" srcset=\"https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/03\/gemini-2-embedding-1024x577.webp 1024w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/03\/gemini-2-embedding-300x169.webp 300w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/03\/gemini-2-embedding-768x433.webp 768w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/03\/gemini-2-embedding-1536x866.webp 1536w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/03\/gemini-2-embedding-2048x1155.webp 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"key-takeaways\" style=\"font-size:24px\"><strong>Key Takeaways<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Gemini Embedding 2 (gemini-embedding-2-preview) is Google&#8217;s first natively multimodal embedding model, released on March 10, 2026.<\/li>\n\n\n\n<li>It maps text, images, video, audio, and PDF documents into a single unified embedding space \u2014 enabling true cross-modal search.<\/li>\n\n\n\n<li>It supports over 100 languages and generates 3072-dimensional vectors by default.<\/li>\n\n\n\n<li>It uses Matryoshka Representation Learning (MRL), allowing output dimensions to be scaled down to 128\u20133072 without significant quality loss.<\/li>\n\n\n\n<li>It is available now via the Gemini API and Vertex AI in Public Preview.<\/li>\n\n\n\n<li>It is incompatible with the previous gemini-embedding-001 model \u2014 existing data must be re-embedded when migrating.<\/li>\n\n\n\n<li>It powers use cases including RAG systems, semantic search, classification, clustering, and anomaly detection \u2014 now across all media types, not just text.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block has-custom-cd-994-c-color has-text-color has-link-color wp-elements-edf958948c24602de850e5987590895e\" id=\"rank-math-toc\"><p>Table of Contents<\/p><nav><ul><li><a href=\"#key-takeaways\">Key Takeaways<\/a><\/li><li><a href=\"#what-is-gemini-embedding-2\">What Is Gemini Embedding 2?<\/a><ul><li><a href=\"#why-does-this-matter\">Why Does This Matter?<\/a><\/li><\/ul><\/li><li><a href=\"#how-does-gemini-embedding-2-work\">How Does Gemini Embedding 2 Work?<\/a><ul><li><a href=\"#the-core-concept-embedding-space\">The Core Concept: Embedding Space<\/a><\/li><li><a href=\"#matryoshka-representation-learning-mrl\">Matryoshka Representation Learning (MRL)<\/a><\/li><li><a href=\"#interleaved-multimodal-input\">Interleaved Multimodal Input<\/a><\/li><\/ul><\/li><li><a href=\"#what-can-gemini-embedding-2-process\">What Can Gemini Embedding 2 Process?<\/a><ul><li><a href=\"#supported-modalities-and-limits\">Supported Modalities and Limits<\/a><\/li><li><a href=\"#special-capabilities\">Special Capabilities<\/a><\/li><\/ul><\/li><li><a href=\"#key-features-whats-new-vs-gemini-embedding-001\">Key Features: What&#8217;s New vs. gemini-embedding-001<\/a><ul><li><a href=\"#1-multimodal-input\">1. Multimodal Input<\/a><\/li><li><a href=\"#2-custom-task-instructions\">2. Custom Task Instructions<\/a><\/li><li><a href=\"#3-adjustable-output-dimensions\">3. Adjustable Output Dimensions<\/a><\/li><li><a href=\"#4-document-ocr\">4. Document OCR<\/a><\/li><\/ul><\/li><li><a href=\"#how-to-use-gemini-embedding-2-step-by-step\">How to Use Gemini Embedding 2: Step-by-Step<\/a><ul><li><a href=\"#step-1-install-the-sdk\">Step 1: Install the SDK<\/a><\/li><li><a href=\"#step-2-set-up-your-api-key\">Step 2: Set Up Your API Key<\/a><\/li><li><a href=\"#step-3-generate-a-text-embedding\">Step 3: Generate a Text Embedding<\/a><\/li><li><a href=\"#step-4-embed-an-image\">Step 4: Embed an Image<\/a><\/li><li><a href=\"#step-5-embed-text-image-together-single-aggregated-vector\">Step 5: Embed Text + Image Together (Single Aggregated Vector)<\/a><\/li><li><a href=\"#step-6-use-a-task-type-for-better-accuracy\">Step 6: Use a Task Type for Better Accuracy<\/a><\/li><li><a href=\"#step-7-control-output-dimensions\">Step 7: Control Output Dimensions<\/a><\/li><\/ul><\/li><li><a href=\"#use-cases-what-can-you-build-with-gemini-embedding-2\">Use Cases: What Can You Build With Gemini Embedding 2?<\/a><ul><li><a href=\"#multimodal-rag-retrieval-augmented-generation\">Multimodal RAG (Retrieval-Augmented Generation)<\/a><\/li><li><a href=\"#cross-modal-search\">Cross-Modal Search<\/a><\/li><li><a href=\"#semantic-search-across-100-languages\">Semantic Search Across 100+ Languages<\/a><\/li><li><a href=\"#document-intelligence\">Document Intelligence<\/a><\/li><li><a href=\"#classification-and-sentiment-analysis\">Classification and Sentiment Analysis<\/a><\/li><li><a href=\"#anomaly-detection\">Anomaly Detection<\/a><\/li><li><a href=\"#supported-vector-databases-and-frameworks\">Supported Vector Databases and Frameworks<\/a><\/li><\/ul><\/li><li><a href=\"#migrating-from-gemini-embedding-001\">Migrating from gemini-embedding-001<\/a><ul><li><a href=\"#what-you-must-do\">What You Must Do<\/a><\/li><li><a href=\"#what-stays-the-same\">What Stays the Same<\/a><\/li><\/ul><\/li><li><a href=\"#pricing-and-availability\">Pricing and Availability<\/a><ul><li><a href=\"#access-options\">Access Options<\/a><\/li><li><a href=\"#knowledge-cutoff\">Knowledge Cutoff<\/a><\/li><\/ul><\/li><li><a href=\"#troubleshooting-common-issues\">Troubleshooting Common Issues<\/a><ul><li><a href=\"#my-cosine-similarity-scores-are-unexpected\">&#8220;My cosine similarity scores are unexpected&#8221;<\/a><\/li><li><a href=\"#im-getting-different-results-than-with-gemini-embedding-001\">&#8220;I&#8217;m getting different results than with gemini-embedding-001&#8221;<\/a><\/li><li><a href=\"#my-video-embedding-seems-incomplete\">&#8220;My video embedding seems incomplete&#8221;<\/a><\/li><li><a href=\"#the-model-isnt-available-in-my-region\">&#8220;The model isn&#8217;t available in my region&#8221;<\/a><\/li><li><a href=\"#embedding-audio-from-a-video-is-failing\">&#8220;Embedding audio from a video is failing&#8221;<\/a><\/li><\/ul><\/li><li><a href=\"#bonus-turn-your-ai-retrieved-content-into-full-video-with-gaga-ai\">BONUS: Turn Your AI-Retrieved Content Into Full Video with Gaga AI<\/a><ul><li><a href=\"#what-gaga-ai-offers\">What Gaga AI Offers<\/a><ul><li><a href=\"#image-to-video-ai\">Image to Video AI<\/a><\/li><li><a href=\"#video-and-audio-infusion\">Video and Audio Infusion<\/a><\/li><li><a href=\"#ai-avatar\">AI Avatar<\/a><\/li><li><a href=\"#ai-voice-clone\">AI Voice Clone<\/a><\/li><li><a href=\"#text-to-speech-tts\">Text-to-Speech (TTS)<\/a><\/li><\/ul><\/li><li><a href=\"#a-practical-gemini-embedding-2-gaga-ai-workflow\">A Practical Gemini Embedding 2 + Gaga AI Workflow<\/a><\/li><\/ul><\/li><li><a href=\"#frequently-asked-questions-faq\">Frequently Asked Questions (FAQ)<\/a><ul><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-gemini-embedding-2\"><strong>What Is Gemini Embedding 2?<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/blog.google\/innovation-and-ai\/models-and-research\/gemini-models\/gemini-embedding-2\/\" rel=\"nofollow noopener\" target=\"_blank\">Gemini Embedding 2<\/a> is Google&#8217;s first natively multimodal AI embedding model that converts text, images, video, audio, and documents into numerical vectors within a single, unified embedding space.<\/p>\n\n\n\n<p>Released on March 10, 2026, it is built on the Gemini architecture and represents a fundamental upgrade over its predecessor gemini-embedding-001, which was text-only. With Gemini Embedding 2, a search query typed in English can now retrieve a matching video clip, an image, or a PDF page \u2014 all using the same vector math.<\/p>\n\n\n\n<p>The model ID is gemini-embedding-2-preview and it is available in Public Preview through both the Gemini API and Vertex AI.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-does-this-matter\"><strong>Why Does This Matter?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Most embedding models today operate on a single modality. You need a separate model for text, a different one for images, another for audio. Gemini Embedding 2 collapses all of that into one model, one API call, and one shared vector space.<\/p>\n\n\n\n<p>This means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A text query can find the most relevant image, video clip, or audio segment<\/li>\n\n\n\n<li>An image can be used to retrieve semantically similar documents<\/li>\n\n\n\n<li>Mixed-media content (a slide deck with text + images) can be embedded in a single request<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-does-gemini-embedding-2-work\"><strong>How Does Gemini Embedding 2 Work?<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 converts any supported input \u2014 text, image, audio, video, or PDF \u2014 into a high-dimensional numerical vector that captures its semantic meaning, then places it into a shared mathematical space where similar concepts cluster together regardless of modality.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"the-core-concept-embedding-space\" style=\"font-size:24px\"><strong>The Core Concept: Embedding Space<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>An embedding is a list of numbers (a vector) that represents the meaning of content. When two pieces of content are semantically similar \u2014 even if one is a text description and the other is an image \u2014 their vectors will be mathematically close in the embedding space.<\/p>\n\n\n\n<p>Gemini Embedding 2 generates 3072-dimensional vectors by default. Each dimension captures a different aspect of meaning: topic, tone, context, visual content, acoustic properties, and more.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"matryoshka-representation-learning-mrl\" style=\"font-size:24px\"><strong>Matryoshka Representation Learning (MRL)<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 is trained using MRL \u2014 a technique that &#8220;nests&#8221; information within the vector. This means:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can truncate the 3072-dimensional output to a smaller size (e.g., 768 or 1536 dimensions)<\/li>\n\n\n\n<li>Smaller vectors cost less to store and process<\/li>\n\n\n\n<li>Performance degrades gracefully \u2014 768 dimensions still achieves competitive quality<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>MTEB benchmark scores by dimension (text):<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Dimension<\/strong><\/td><td><strong>MTEB Score<\/strong><\/td><\/tr><tr><td>2048<\/td><td>68.16<\/td><\/tr><tr><td>1536<\/td><td>68.17<\/td><\/tr><tr><td>768<\/td><td>67.99<\/td><\/tr><tr><td>512<\/td><td>67.55<\/td><\/tr><tr><td>256<\/td><td>66.19<\/td><\/tr><tr><td>128<\/td><td>63.31<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Recommended dimensions: 768, 1536, or 3072 for highest quality.<\/p>\n\n\n\n<p>\u26a0\ufe0f Important: The 3072-dimension output is automatically normalized. For 768 and 1536, you must manually normalize the vector before cosine similarity calculations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"interleaved-multimodal-input\" style=\"font-size:24px\"><strong>Interleaved Multimodal Input<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Unlike previous models that process one modality at a time, Gemini Embedding 2 natively understands interleaved input \u2014 meaning you can pass text + image + audio in a single API request, and it generates one aggregated embedding that captures the combined meaning.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-can-gemini-embedding-2-process\"><strong>What Can Gemini Embedding 2 Process?<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 accepts five modality types: text, images, audio, video, and PDF documents \u2014 each with specific format and size limits.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"supported-modalities-and-limits\" style=\"font-size:24px\"><strong>Supported Modalities and Limits<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Modality<\/strong><\/td><td><strong>Max Per Request<\/strong><\/td><td><strong>Max Duration \/ Size<\/strong><\/td><td><strong>Supported Formats<\/strong><\/td><\/tr><tr><td>Text<\/td><td>\u2014<\/td><td>8,192 tokens<\/td><td>Any text<\/td><\/tr><tr><td>Images<\/td><td>6 images<\/td><td>No file size limit<\/td><td>PNG, JPEG<\/td><\/tr><tr><td>Audio<\/td><td>1 file<\/td><td>80 seconds<\/td><td>MP3, WAV<\/td><\/tr><tr><td>Video<\/td><td>1 file<\/td><td>128 sec (no audio) \/ 80 sec (with audio)<\/td><td>MP4, MOV (H264, H265, AV1, VP9)<\/td><\/tr><tr><td>PDF Documents<\/td><td>1 file<\/td><td>6 pages<\/td><td>PDF<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Total input limit across all modalities: 8,192 tokens per request.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"special-capabilities\" style=\"font-size:24px\"><strong>Special Capabilities<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Document OCR \u2014 The model reads and embeds text extracted from PDFs, not just the visual appearance.<\/li>\n\n\n\n<li>Audio Track Extraction \u2014 When embedding video, the model can automatically extract and process the audio track alongside the visual frames \u2014 no manual preprocessing required.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"key-features-whats-new-vs-gemini-embedding-001\"><strong>Key Features: What&#8217;s New vs. gemini-embedding-001<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 introduces four major features that its predecessor lacked: multimodal input, custom task instructions, adjustable output dimensions, and document OCR.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-multimodal-input\" style=\"font-size:24px\"><strong>1. Multimodal Input<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>The most significant upgrade. gemini-embedding-001 was text-only. Gemini Embedding 2 handles all five modality types in one unified model.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-custom-task-instructions\" style=\"font-size:24px\"><strong>2. Custom Task Instructions<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>You can now specify what you intend to do with the embedding. This helps the model optimize the vector for the specific task, increasing accuracy.<\/p>\n\n\n\n<p>Supported task types:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Task Type<\/strong><\/td><td><strong>Use Case<\/strong><\/td><\/tr><tr><td>SEMANTIC_SIMILARITY<\/td><td>Comparing two pieces of content for meaning closeness<\/td><\/tr><tr><td>CLASSIFICATION<\/td><td>Sentiment analysis, spam detection<\/td><\/tr><tr><td>CLUSTERING<\/td><td>Document organization, anomaly detection<\/td><\/tr><tr><td>RETRIEVAL_DOCUMENT<\/td><td>Indexing articles, books, web pages for search<\/td><\/tr><tr><td>RETRIEVAL_QUERY<\/td><td>User search queries<\/td><\/tr><tr><td>CODE_RETRIEVAL_QUERY<\/td><td>Finding code blocks from natural language queries<\/td><\/tr><tr><td>QUESTION_ANSWERING<\/td><td>Finding documents that answer a specific question<\/td><\/tr><tr><td>FACT_VERIFICATION<\/td><td>Retrieving evidence to verify a claim<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-adjustable-output-dimensions\" style=\"font-size:24px\"><strong>3. Adjustable Output Dimensions<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Use the output_dimensionality parameter to get a smaller, cheaper vector when full precision isn&#8217;t needed. Supported range: 128 to 3072.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"4-document-ocr\" style=\"font-size:24px\"><strong>4. Document OCR<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Embed PDFs by processing their actual textual and visual content \u2014 not just metadata. The model reads and understands what&#8217;s on each page.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-use-gemini-embedding-2-step-by-step\"><strong>How to Use Gemini Embedding 2: Step-by-Step<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 is available via the google-genai Python SDK, JavaScript SDK, REST API, and third-party integrations including LangChain, LlamaIndex, and ChromaDB.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-install-the-sdk\" style=\"font-size:24px\"><strong>Step 1: Install the SDK<\/strong><\/h3>\n\n\n\n<p>pip install google-genai<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-set-up-your-api-key\" style=\"font-size:24px\"><strong>Step 2: Set Up Your API Key<\/strong><\/h3>\n\n\n\n<p>Get your API key from <a href=\"https:\/\/aistudio.google.com\" rel=\"nofollow noopener\" target=\"_blank\">Google AI Studio<\/a>.<\/p>\n\n\n\n<p>import os<\/p>\n\n\n\n<p>os.environ[&#8220;GOOGLE_API_KEY&#8221;] = &#8220;your_api_key_here&#8221;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-generate-a-text-embedding\" style=\"font-size:24px\"><strong>Step 3: Generate a Text Embedding<\/strong><\/h3>\n\n\n\n<p>from google import genai<\/p>\n\n\n\n<p>client = genai.Client()<\/p>\n\n\n\n<p>result = client.models.embed_content(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;model=&#8221;gemini-embedding-2-preview&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;contents=&#8221;What is the meaning of life?&#8221;<\/p>\n\n\n\n<p>)<\/p>\n\n\n\n<p>print(result.embeddings)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-embed-an-image\" style=\"font-size:24px\"><strong>Step 4: Embed an Image<\/strong><\/h3>\n\n\n\n<p>from google import genai<\/p>\n\n\n\n<p>from google.genai import types<\/p>\n\n\n\n<p>client = genai.Client()<\/p>\n\n\n\n<p>with open(&#8220;example.png&#8221;, &#8220;rb&#8221;) as f:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;image_bytes = f.read()<\/p>\n\n\n\n<p>result = client.models.embed_content(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;model=&#8221;gemini-embedding-2-preview&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;contents=[<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;types.Part.from_bytes(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data=image_bytes,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mime_type=&#8221;image\/png&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;),<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;]<\/p>\n\n\n\n<p>)<\/p>\n\n\n\n<p>print(result.embeddings)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5-embed-text-image-together-single-aggregated-vector\" style=\"font-size:24px\"><strong>Step 5: Embed Text + Image Together (Single Aggregated Vector)<\/strong><\/h3>\n\n\n\n<p>from google import genai<\/p>\n\n\n\n<p>from google.genai import types<\/p>\n\n\n\n<p>client = genai.Client()<\/p>\n\n\n\n<p>with open(&#8220;dog.png&#8221;, &#8220;rb&#8221;) as f:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;image_bytes = f.read()<\/p>\n\n\n\n<p>result = client.models.embed_content(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;model=&#8221;gemini-embedding-2-preview&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;contents=[<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;types.Content(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parts=[<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;types.Part(text=&#8221;An image of a dog&#8221;),<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;types.Part.from_bytes(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data=image_bytes,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mime_type=&#8221;image\/png&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;]<\/p>\n\n\n\n<p>)<\/p>\n\n\n\n<p># Returns ONE aggregated embedding for both inputs<\/p>\n\n\n\n<p>for embedding in result.embeddings:<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;print(embedding.values)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-6-use-a-task-type-for-better-accuracy\" style=\"font-size:24px\"><strong>Step 6: Use a Task Type for Better Accuracy<\/strong><\/h3>\n\n\n\n<p>from google import genai<\/p>\n\n\n\n<p>from google.genai import types<\/p>\n\n\n\n<p>client = genai.Client()<\/p>\n\n\n\n<p>result = client.models.embed_content(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;model=&#8221;gemini-embedding-2-preview&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;contents=&#8221;How do transformers work in NLP?&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;config=types.EmbedContentConfig(task_type=&#8221;RETRIEVAL_QUERY&#8221;)<\/p>\n\n\n\n<p>)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-7-control-output-dimensions\" style=\"font-size:24px\"><strong>Step 7: Control Output Dimensions<\/strong><\/h3>\n\n\n\n<p>from google import genai<\/p>\n\n\n\n<p>from google.genai import types<\/p>\n\n\n\n<p>client = genai.Client()<\/p>\n\n\n\n<p>result = client.models.embed_content(<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;model=&#8221;gemini-embedding-2-preview&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;contents=&#8221;Semantic search example&#8221;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;config=types.EmbedContentConfig(output_dimensionality=768)<\/p>\n\n\n\n<p>)<\/p>\n\n\n\n<p>\u26a0\ufe0f Remember: Normalize the vector manually if using dimensions other than 3072.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"use-cases-what-can-you-build-with-gemini-embedding-2\"><strong>Use Cases: What Can You Build With Gemini Embedding 2?<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 enables any application that needs to find, compare, or organize information across mixed media types.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"multimodal-rag-retrieval-augmented-generation\" style=\"font-size:24px\"><strong>Multimodal RAG (Retrieval-Augmented Generation)<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Build a knowledge base that includes text documents, images, and audio recordings. A user&#8217;s text question retrieves the most relevant content \u2014 regardless of what format it&#8217;s stored in.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"cross-modal-search\" style=\"font-size:24px\"><strong>Cross-Modal Search<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Search a video library using a text description<\/li>\n\n\n\n<li>Find images that match an audio description<\/li>\n\n\n\n<li>Retrieve PDF pages using a photo as the query<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"semantic-search-across-100-languages\" style=\"font-size:24px\"><strong>Semantic Search Across 100+ Languages<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Index content in any language; search in any other. The unified embedding space handles cross-lingual retrieval without translation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"document-intelligence\" style=\"font-size:24px\"><strong>Document Intelligence<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Embed PDFs directly. No need to extract text first. The model reads and understands the content visually and textually, then places it in the vector space.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"classification-and-sentiment-analysis\" style=\"font-size:24px\"><strong>Classification and Sentiment Analysis<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Embed incoming content (text, image, or mixed) and classify it against label embeddings. Works for spam detection, content moderation, and review analysis.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"anomaly-detection\" style=\"font-size:24px\"><strong>Anomaly Detection<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Embed operational logs, sensor data, or media assets. Flag items whose vectors are statistical outliers from the expected cluster.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"supported-vector-databases-and-frameworks\" style=\"font-size:24px\"><strong>Supported Vector Databases and Frameworks<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 integrates natively with:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>LangChain \u2014 docs.langchain.com<\/li>\n\n\n\n<li>LlamaIndex \u2014 developers.llamaindex.ai<\/li>\n\n\n\n<li>Haystack \u2014 haystack.deepset.ai<\/li>\n\n\n\n<li>Weaviate \u2014 docs.weaviate.io<\/li>\n\n\n\n<li>Qdrant \u2014 qdrant.tech<\/li>\n\n\n\n<li>ChromaDB \u2014 docs.trychroma.com<\/li>\n\n\n\n<li>Pinecone \u2014 via REST API<\/li>\n\n\n\n<li>BigQuery, AlloyDB, Cloud SQL \u2014 via Google Cloud<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"migrating-from-gemini-embedding-001\"><strong>Migrating from gemini-embedding-001<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>If you are currently using gemini-embedding-001, you cannot simply swap model names \u2014 the embedding spaces are mathematically incompatible.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-you-must-do\" style=\"font-size:24px\"><strong>What You Must Do<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Re-embed all existing data using gemini-embedding-2-preview<\/li>\n\n\n\n<li>Update your model ID in all API calls<\/li>\n\n\n\n<li>Update dimension handling \u2014 check if you need to normalize vectors for non-3072 outputs<\/li>\n\n\n\n<li>Update task type parameters if using the task type feature<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-stays-the-same\" style=\"font-size:24px\"><strong>What Stays the Same<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The API call structure (embed_content method) is identical<\/li>\n\n\n\n<li>The output_dimensionality parameter works the same way<\/li>\n\n\n\n<li>Default output dimensions (3072) remain the same<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>\u2705 Batch processing tip: Use the Gemini API Batch Mode for re-embedding large datasets. Batch API runs at 50% of the standard embedding price, making large migrations cost-effective.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"pricing-and-availability\"><strong>Pricing and Availability<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 is available now in Public Preview through the Gemini API and Vertex AI, billed under Standard PayGo pricing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"access-options\" style=\"font-size:24px\"><strong>Access Options<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Platform<\/strong><\/td><td><strong>Access<\/strong><\/td><td><strong>Current Availability<\/strong><\/td><\/tr><tr><td>Gemini API<\/td><td>Standard PayGo<\/td><td>\u2705 Public Preview<\/td><\/tr><tr><td>Vertex AI<\/td><td>Standard PayGo<\/td><td>\u2705 Public Preview (us-central1)<\/td><\/tr><tr><td>Vertex AI Provisioned Throughput<\/td><td>\u2014<\/td><td>\u274c Not yet supported<\/td><\/tr><tr><td>Vertex AI Batch Prediction<\/td><td>\u2014<\/td><td>\u274c Not yet supported<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Batch API discount: If latency is not critical, use the Gemini API Batch Mode for 50% cost savings on large embedding jobs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"knowledge-cutoff\" style=\"font-size:24px\"><strong>Knowledge Cutoff<\/strong><\/h3>\n\n\n\n<p>The model&#8217;s training knowledge cutoff is November 2025.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"troubleshooting-common-issues\"><strong>Troubleshooting Common Issues<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"my-cosine-similarity-scores-are-unexpected\" style=\"font-size:24px\"><strong>&#8220;My cosine similarity scores are unexpected&#8221;<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Solution: Check whether you&#8217;re using 3072 dimensions (auto-normalized) or a smaller dimension (requires manual normalization). Non-3072 vectors must be L2-normalized before cosine similarity calculations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"im-getting-different-results-than-with-gemini-embedding-001\" style=\"font-size:24px\"><strong>&#8220;I&#8217;m getting different results than with gemini-embedding-001&#8221;<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Expected behavior. The two models use incompatible embedding spaces. You must re-embed all your documents with the new model before comparing results. Do not mix embeddings from the two models.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"my-video-embedding-seems-incomplete\" style=\"font-size:24px\"><strong>&#8220;My video embedding seems incomplete&#8221;<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Solution: Videos longer than 128 seconds are not fully processed in a single request. Chunk your video into overlapping segments of \u2264128 seconds and embed each segment individually.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"the-model-isnt-available-in-my-region\" style=\"font-size:24px\"><strong>&#8220;The model isn&#8217;t available in my region&#8221;<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Current limitation. During Public Preview, Gemini Embedding 2 on Vertex AI is only available in us-central1. Check the Vertex AI locations page for regional expansion updates.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"embedding-audio-from-a-video-is-failing\" style=\"font-size:24px\"><strong>&#8220;Embedding audio from a video is failing&#8221;<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Solution: The model supports audio track extraction from video natively, but the video must be \u226480 seconds when audio is included (the limit drops from 128 to 80 seconds when the audio track is processed).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"bonus-turn-your-ai-retrieved-content-into-full-video-with-gaga-ai\"><strong>BONUS: Turn Your AI-Retrieved Content Into Full Video with Gaga AI<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 helps you find and organize content. <a href=\"https:\/\/gaga.art\/en\/\">Gaga AI<\/a> helps you present it.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"623\" src=\"https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/02\/gaga-ai-video-generation-1024x623.webp\" alt=\"gaga ai video generation\" class=\"wp-image-1426\" srcset=\"https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/02\/gaga-ai-video-generation-1024x623.webp 1024w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/02\/gaga-ai-video-generation-300x183.webp 300w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/02\/gaga-ai-video-generation-768x467.webp 768w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/02\/gaga-ai-video-generation-1536x935.webp 1536w, https:\/\/gaga.art\/blog\/wp-content\/uploads\/2026\/02\/gaga-ai-video-generation-2048x1246.webp 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Once Gemini Embedding 2 powers your search or RAG pipeline, the natural next step for many creators and businesses is turning that retrieved content into something people actually watch. Gaga AI is an all-in-one AI video creation platform purpose-built for that exact workflow.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-a89b3969 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"http:\/\/gaga.art\/app\" target=\"_blank\" rel=\"noreferrer noopener\">Generate Video Free<\/a><\/div>\n\n\n\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/gaga.art\/\">Learn Gaga AI<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-gaga-ai-offers\" style=\"font-size:24px\"><strong>What Gaga AI Offers<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"image-to-video-ai\"><strong>Image to Video AI<\/strong><\/h4>\n\n\n\n<p>Convert any retrieved image or static asset into a dynamic video clip. Perfect for:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Turning Gemini Embedding 2-retrieved product images into demo videos<\/li>\n\n\n\n<li>Animating retrieved visual search results for social media<\/li>\n\n\n\n<li>Building preview clips from image archives<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"video-and-audio-infusion\"><strong>Video and Audio Infusion<\/strong><\/h4>\n\n\n\n<p>Don&#8217;t just generate video \u2014 synchronize it with audio intelligently:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Layer retrieved audio content over video clips with precise timing<\/li>\n\n\n\n<li>Add AI-generated background music that adapts to video mood<\/li>\n\n\n\n<li>Balance voiceover, music, and sound effects in one step<\/li>\n\n\n\n<li>Sync visual transitions to beat detection automatically<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>This is especially powerful when combined with Gemini Embedding 2&#8217;s audio retrieval \u2014 find the right audio, then use Gaga AI to infuse it into the final video output.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ai-avatar\"><strong>AI Avatar<\/strong><\/h4>\n\n\n\n<p>Create a photorealistic AI presenter that can deliver your retrieved content on camera \u2014 without you ever recording a video:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Presenting search results or RAG-generated summaries as talking-head videos<\/li>\n\n\n\n<li>Narrating multimodal content retrieved by Gemini Embedding 2<\/li>\n\n\n\n<li>Building branded video spokespeople for product or documentation pages<\/li>\n\n\n\n<li>Multilingual video delivery: same avatar, multiple languages<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ai-voice-clone\"><strong>AI Voice Clone<\/strong><\/h4>\n\n\n\n<p>Record a brief voice sample and Gaga AI builds a digital clone of your voice:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Narrate AI-retrieved content in your own voice consistently<\/li>\n\n\n\n<li>Localize content rapidly \u2014 clone once, speak in any language<\/li>\n\n\n\n<li>Generate podcast-style audio summaries of search results<\/li>\n\n\n\n<li>Maintain a consistent voice identity across all video content<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"text-to-speech-tts\"><strong>Text-to-Speech (TTS)<\/strong><\/h4>\n\n\n\n<p>Skip the voice recording entirely with Gaga AI&#8217;s high-quality TTS engine:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Natural-sounding voices in multiple languages and accents<\/li>\n\n\n\n<li>Emotional tone control: neutral, professional, warm, energetic<\/li>\n\n\n\n<li>SSML support for fine-grained pacing and emphasis<\/li>\n\n\n\n<li>Adjustable speed, pitch, and style per script segment<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"a-practical-gemini-embedding-2-gaga-ai-workflow\" style=\"font-size:24px\"><strong>A Practical Gemini Embedding 2 + Gaga AI Workflow<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Index your content library (text, images, audio, video) using Gemini Embedding 2<\/li>\n\n\n\n<li>Retrieve the most semantically relevant assets via cross-modal search<\/li>\n\n\n\n<li>Animate retrieved images into video clips using Gaga AI<\/li>\n\n\n\n<li>Infuse retrieved audio into the video with Gaga AI&#8217;s audio layer<\/li>\n\n\n\n<li>Add an AI Avatar to present the results or narrate the summary<\/li>\n\n\n\n<li>Voice it with TTS or your voice clone for the final narration<\/li>\n\n\n\n<li>Publish the finished video to YouTube, LinkedIn, or TikTok<\/li>\n<\/ol>\n\n\n\n<p>This pipeline takes raw multimodal data, surfaces the right content with Gemini Embedding 2&#8217;s semantic intelligence, and wraps it in a production-ready video with Gaga AI \u2014 end to end, without a camera crew or editor.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"frequently-asked-questions-faq\"><strong>Frequently Asked Questions (FAQ)<\/strong><\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-is-gemini-embedding-2-1\" style=\"font-size:24px\"><strong>What is Gemini Embedding 2?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 (gemini-embedding-2-preview) is Google&#8217;s first natively multimodal embedding model. Released on March 10, 2026, it converts text, images, video, audio, and PDF documents into numerical vectors within a single unified embedding space, enabling cross-modal semantic search and retrieval.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-makes-gemini-embedding-2-different-from-other-embedding-models\" style=\"font-size:24px\"><strong>What makes Gemini Embedding 2 different from other embedding models?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Most embedding models are text-only or single-modality. Gemini Embedding 2 is natively multimodal \u2014 it maps all five media types into the same mathematical space using one model. It also supports custom task types, adjustable output dimensions via MRL, document OCR, and audio extraction from video.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"is-gemini-embedding-2-free\" style=\"font-size:24px\"><strong>Is Gemini Embedding 2 free?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 is available via Standard PayGo pricing on both the Gemini API and Vertex AI. There is no free tier listed in the Public Preview documentation. A 50% discount is available when using the Gemini API Batch Mode for non-latency-sensitive jobs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-use-gemini-embedding-2-preview-to-replace-gemini-embedding-001\" style=\"font-size:24px\"><strong>Can I use gemini-embedding-2-preview to replace gemini-embedding-001?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>No \u2014 not directly. The two models produce vectors in incompatible embedding spaces. If you switch, you must re-embed all existing documents and data using the new model before running any similarity comparisons.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-languages-does-gemini-embedding-2-support\" style=\"font-size:24px\"><strong>What languages does Gemini Embedding 2 support?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Gemini Embedding 2 captures semantic intent across more than 100 languages, enabling cross-lingual retrieval \u2014 a query in one language can retrieve semantically matching content in another.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-are-the-input-limits-for-gemini-embedding-2\" style=\"font-size:24px\"><strong>What are the input limits for Gemini Embedding 2?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>The total input limit is 8,192 tokens. Per-modality limits: text (8,192 tokens), images (6 per request, PNG\/JPEG), audio (1 file, max 80 seconds, MP3\/WAV), video (1 file, max 128 seconds without audio \/ 80 seconds with audio, MP4\/MOV), PDF (1 file, max 6 pages).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-output-dimensions-does-gemini-embedding-2-support\" style=\"font-size:24px\"><strong>What output dimensions does Gemini Embedding 2 support?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>The default output is a 3,072-dimensional vector. Using MRL, you can reduce this to any size between 128 and 3,072. Google recommends using 768, 1,536, or 3,072 for best quality. Vectors smaller than 3,072 must be manually L2-normalized before use.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-embed-video-and-audio-together-in-one-request\" style=\"font-size:24px\"><strong>Can I embed video and audio together in one request?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Yes. Gemini Embedding 2 supports interleaved multimodal input. You can pass text, image, audio, and video parts within a single request. When submitted as a single Content entry, it returns one aggregated embedding.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"where-is-gemini-embedding-2-available\" style=\"font-size:24px\"><strong>Where is Gemini Embedding 2 available?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>It is available via the Gemini API globally and via Vertex AI in the us-central1 region during Public Preview. Broader regional availability is expected as the model moves toward General Availability.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"what-can-i-build-with-gemini-embedding-2\" style=\"font-size:24px\"><strong>What can I build with Gemini Embedding 2?<\/strong><\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Key use cases include: multimodal RAG systems, cross-modal semantic search, document intelligence pipelines, content classification and moderation, multilingual search, clustering and anomaly detection, and recommendation engines that work across text, image, audio, and video content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Gemini Embedding 2 maps text, images, video, audio &amp; docs into one AI space. Google&#8217;s most powerful embedding model is live \u2014 here&#8217;s what it means for you.<\/p>\n","protected":false},"author":2,"featured_media":1893,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1892","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-p-r"],"_links":{"self":[{"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/posts\/1892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/comments?post=1892"}],"version-history":[{"count":1,"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/posts\/1892\/revisions"}],"predecessor-version":[{"id":1894,"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/posts\/1892\/revisions\/1894"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/media\/1893"}],"wp:attachment":[{"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/media?parent=1892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/categories?post=1892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gaga.art\/blog\/wp-json\/wp\/v2\/tags?post=1892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}