gemini-embedding-2-preview is deprecated: calls now route to gemini-embedding-2, no re-indexing needed (November 6, 2026)
Calls to gemini-embedding-2-preview now go to gemini-embedding-2. Change the model string. Stored vectors still match.
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. What you paste stays in this tab. It is never sent to Wirestack or saved.
- Google Gemini API API keyGEMINI_API_KEYGet key
Click Create API key
What you get
On November 6, 2026 Google deprecated gemini-embedding-2-preview. From that day, requests to it are routed to gemini-embedding-2 and billed at Gemini Embedding 2 rates.
Google says gemini-embedding-2 uses the same API schema, pricing and embedding space. In its words: "no other code changes or vector re-indexing are needed." Vectors you already stored with the preview model still match new ones.
The deprecations page lists November 6, 2026 as the shutdown date for the preview and gemini-embedding-2 as its replacement.
Prerequisites
Steps
- Search your code and config for
gemini-embedding-2-preview. - Change the model string to
gemini-embedding-2. Here is Google's Python example with the new name:
from google import genai
client = genai.Client()
result = client.models.embed_content(
model="gemini-embedding-2",
contents="What is the meaning of life?"
)
print(result.embeddings)