gemini-embedding-001 to gemini-embedding-2
Some values not published Checked 2026-11-12.
Price per 1M tokens
| Field | Old | New | Change |
|---|---|---|---|
| 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
| Limit | Old | New | Change |
|---|---|---|---|
| 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
- Read the shutdown date for gemini-embedding-001 on the linked official page.
- Point your requests at gemini-embedding-2.
- Re-check price, context, and parameters on the provider pages linked here.
- Ship the change before the published shutdown date.