> ## AI Agent Context
> Get the complete documentation index at: https://aistudio.google.com/llms.txt
> Use this file to discover all available pages.
> For the full documentation in a single file, fetch: https://aistudio.google.com/llms-full.txt

# Gemini Embedding 2 preview model

{% callout type="caution" %}
  Gemini Embedding 2 Preview (`gemini-embedding-2-preview`) is
  [deprecated](/docs/deprecations#embedding-deprecated-models). Effective
  November 6, 2026, API requests to `gemini-embedding-2-preview` route to
  [Gemini Embedding 2 (`gemini-embedding-2`)](/docs/models/gemini-embedding-2)
  at [Gemini Embedding 2 rates](/docs/pricing#gemini-embedding-2). Update your
  model string to `gemini-embedding-2`. `gemini-embedding-2` uses the same API
  schema, pricing, and embedding space, so no other code changes or vector
  re-indexing are needed.

{% /callout %}

Our first multimodal embedding model, providing efficient numerical mapping of
text, images, video, audio, and PDFs into a single unified embedding space. The
Gemini Embedding 2 model is best for cross-modal semantic search, document
retrieval, and recommendation systems that require fast, scalable similarity
calculations across large multimodal datasets.

## Documentation  {% id="documentation" %}

Visit the [Embeddings](/docs/embeddings) page for full coverage
of features and capabilities.

## gemini-embedding-2-preview  {% id="gemini-embedding-2-preview" %}

{% table variant="model" %}
  * Property
  * Description

  ---

  *     {% section class="model-property" %}
  {% icon name="id_card" /%}Model code

    {% /section %}

  * **Gemini API**
    `gemini-embedding-2-preview`

  ---

  *     {% section class="model-property" %}
  {% icon name="save" /%}Supported data types

    {% /section %}

  *     **Input** Text, image, video, audio, PDF

    **Output** Text embeddings


  ---

  *     {% section class="model-property" %}
  {% icon name="token_auto" /%}Token limits{% sup %}[[*]](/docs/tokens){% /sup %}

    {% /section %}

  *     **Input token limit** 8,192

    **Output dimension size** Flexible, supports: 128 - 3072, Recommended: 768, 1536, 3072


  ---

  *     {% section class="model-property" %}
  {% icon name="123" /%}Versions

    {% /section %}

  *     Read the [model version patterns](/docs/models#model-versions) for more details.

    *   Deprecated: `gemini-embedding-2-preview` (effective November 6, 2026, routes to `gemini-embedding-2`)


  ---

  *     {% section class="model-property" %}
  {% icon name="calendar_month" /%}Latest update

    {% /section %}

  * March 2026
{% /table %}

