Google Gemini API · model
embedding-2-preview deprecation: shutdown date & replacement
- Provider
- Google Gemini API
- Type
- model
- Announced
- —
- Shutdown
- Replacement
gemini-embedding-2- Source
- Official Google Gemini API notice
Page lists announced earliest shutdown date.
How to migrate off embedding-2-preview
- Find every place that references it:
grep -rn --exclude-dir={node_modules,.git,dist} "embedding-2-preview" . - Replace the model ID:
- model: "embedding-2-preview" + model: "gemini-embedding-2" - Re-run your evals or a sample of real prompts — output style, token usage and pricing can change between models.
- Check config outside code too: environment variables, feature flags, prompt-management tools, and fine-tuned model references.
- Deploy before August 10, 2026, and add the CI scanner so it cannot come back.
Questions
Is embedding-2-preview deprecated?
Yes. Google Gemini API has deprecated embedding-2-preview. It was shut down on August 10, 2026.
When does embedding-2-preview shut down?
August 10, 2026, according to Google Gemini API's official deprecation notice.
What should I use instead of embedding-2-preview?
Google Gemini API recommends gemini-embedding-2. Switch the model ID and re-test your prompts, since outputs, pricing and limits can differ.
What happens to requests to embedding-2-preview after the shutdown?
Requests using the retired model ID fail with an error, so any code still calling it breaks. Update and deploy before the shutdown date.