text-embedding-004 vs gemini-embedding-2
Google Gemini names gemini-embedding-2 as the replacement for text-embedding-004. text-embedding-004 shut down on Jan 14, 2026.
Retired→Active
Per 1M tokenstext-embedding-004gemini-embedding-2
Input—$0.2
Output——
Blended changeUnknown: a list price is missing
ProviderGoogle GeminiGoogle Gemini
Statusretiredactive
ShutdownJan 14, 2026—
Context window——
Migrating
- Replace the ID
text-embedding-004withgemini-embedding-2everywhere it appears, including .env files, config and infrastructure templates. - Run your evaluation set or golden prompts on both before switching: output style, refusals and tool calling can differ between generations.
- Check max output tokens and parameters: newer models sometimes rename or drop sampling options.
- Watch the repo on ModelRot so the next retirement doesn't surprise you. gemini-embedding-2 lifecycle.