Skip to main content

google/gemini-embedding-2/embedding

Google Gemini Embedding 2 maps multilingual text and documents into 3,072-dimensional dense vectors for semantic search and clustering.

From $0.00017/1,000 tokens

Workbench

Input

Embedding
Pass a single string, a batch of up to 128 strings, or token ID arrays for Gemini Embedding 2; each returned vector keeps its input index.
Safety checkerOff

SpicyAPI does not run a safety checker on this model. Your prompt and media go to the model as written, and the model itself decides what comes back.

Checking your account before enabling submission and pricing.

1 required field missing: Embedding Input

Output

Ready for a new run

Your result will appear here.

Configure the inputs, review the estimate, then run the model.

Missing the model you need?

Google Gemini Embedding 2 maps multilingual text and documents into 3,072-dimensional dense vectors for semantic search and clustering.

Key numbers

Dimensions
3072
Gemini Embedding 2 returns 3072-dimensional floating-point vectors in float format and bills by measured input tokens across the batch.
Batch ceiling
128
128 items · 300K tokens

Token budget

Input window
300,000
tokens in one request

Before you spend

Embedding

Gemini Embedding 2 accepts up to 128 items per request and at most 300,000 tokens in total; token ID arrays are capped at 2,048 entries.

What it does

Dense 3072-dimensional representations

Gemini Embedding 2 from Google outputs floating-point vectors of 3072 dimensions ready for cosine similarity search, clustering, and reranking pipelines.

Single-text or homogeneous batch requests

Send Gemini Embedding 2 one passage or a batch of up to 128 strings or token arrays synchronously, preserving each vector's original input index.

Where it fits

  • Semantic search and RAG indexing

    Index knowledge bases and technical collections with Gemini Embedding 2 to retrieve relevant passages before passing context to a generation model.

  • Clustering and duplicate detection

    Compare 3072-dimensional vectors from Gemini Embedding 2 to group similar tickets, articles, or code snippets.

Model reference

Gemini Embedding 2 API reference

Gemini Embedding 2 API specifications

Dimensions
3072
Batch limits
128 items · 300K tokens

How to call the Gemini Embedding 2 API

  1. Prompt guide & Pro tips

    Use Gemini Embedding 2 for both document indexing and query embedding, keeping each Gemini Embedding 2 call within 128 items and 300,000 tokens and re-embedding when text changes.

Gemini Embedding 2 API questions

All Gemini models16

Text models11