SunsetDiff

Replacement for gemini-embedding-001 (Google Gemini API): what changes when you switch

The official replacement is gemini-embedding-2. gemini-embedding-001 shuts down on 2028-05-14 per Google Gemini API's deprecation page (checked 2026-11-12). Published on the official docs: input price $0.15 per million tokens.

gemini-embedding-001 model page · Google Gemini API

Official replacement. Full diff page

gemini-embedding-001 to gemini-embedding-2

Some values not published Checked 2026-11-12.

Price per 1M tokens

Price comparison. Example monthly cost for 10M input tokens and 2M output tokens. Labeled example, not a bill.
FieldOldNewChange
Input $0.15 Not published Not published
Output Not published Not published Not published
Cached input Not published Not published Not published
Example monthly cost Not published Not published Example only

Context and max output

Token limits
LimitOldNewChange
Context window Not published Not published Not published
Max output Not published Not published Not published

Capabilities that differ

No differing capability values are published for both models.

API changes

  • The embeddings guide says gemini-embedding-001 lets you generate individual embeddings for a list of strings, while Gemini Embedding 2 produces a single aggregated embedding for multiple inputs. Source

Code

python before
from google import genai
client = genai.Client()
result = client.models.embed_content(
    model="gemini-embedding-001",
    contents="What is the meaning of life?",
)
python after
from google import genai
client = genai.Client()
result = client.models.embed_content(
    model="gemini-embedding-2",
    contents="What is the meaning of life?",
)
typescript before
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const response = await ai.models.embedContent({
  model: "gemini-embedding-001",
  contents: "What is the meaning of life?",
});
typescript after
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const response = await ai.models.embedContent({
  model: "gemini-embedding-2",
  contents: "What is the meaning of life?",
});
curl before
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:embedContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -d '{"content":{"parts":[{"text":"What is the meaning of life?"}]}}'
curl after
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-2:embedContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -d '{"content":{"parts":[{"text":"What is the meaning of life?"}]}}'

Checklist

  1. Read the shutdown date for gemini-embedding-001 on the linked official page.
  2. Point your requests at gemini-embedding-2.
  3. Re-check price, context, and parameters on the provider pages linked here.
  4. Ship the change before the published shutdown date.

Related models

Questions

What is the replacement for gemini-embedding-001?

The official replacement is gemini-embedding-2. gemini-embedding-001 shuts down on 2028-05-14 per Google Gemini API's deprecation page (checked 2026-11-12). Published on the official docs: input price $0.15 per million tokens.

Is gemini-embedding-2 cheaper than gemini-embedding-001?

A full price comparison is not published. One or both prices are missing from the official pages we checked.

Does gemini-embedding-2 have a bigger context window than gemini-embedding-001?

Context window sizes are not both published on the official pages we checked.

Sources

Deprecation alerts

We email you before models shut down. Unsubscribe anytime.

Deprecation alert signup
Providers (optional)