text-embedding-004 on Gemini API retired on January 14, 2026

AI model

Date
(UTC)
Replacement
gemini-embedding-2
Platform
Gemini API
Provider
Google
Last checked

text-embedding-004

Retired on Gemini API

In its place: gemini-embedding-2

since.dev/calendar/google/text-embedding-004/gemini

What changes

Recommended replacement: gemini-embedding-2.

What works differently on gemini-embedding-2

From its documentation. Moving to it is more than a new model ID.

  • gemini-embedding-2 produces a single, aggregated embedding when multiple inputs (like text and images) are provided directly in one request. To keep the old behavior: wrap each input in a Content object, or use the Batch API, to generate separate embeddings for individual inputs. Source
  • If you use output_dimensionality to request embeddings with fewer than 3072 dimensions, gemini-embedding-2 automatically normalizes these truncated embeddings. Source
  • Gemini Embedding 2 produces a single aggregated embedding for multiple inputs, while gemini-embedding-001 lets you generate individual embeddings for a list of strings. To keep the old behavior: use the Batch API if you want to generate multiple embeddings at once, or pass each input in its own Content object to get separate embeddings. Source
  • You cannot use the task_type field for the gemini-embedding-2 model. To keep the old behavior: include the task as an instruction in your prompt, formatted with the correct task prefix such as 'task: search result | query: {content}'. Source
  • Multiple parts passed directly in contents produce one aggregated embedding for all inputs, while multiple Content objects return separate embeddings for each entry. To keep the old behavior: wrap each input in its own Content object in the contents parameter to get separate embeddings. Source
  • For text-only tasks, the page strongly recommends adding the task instruction in the prompt, since the task_type field is not used. To keep the old behavior: format the query and document with the correct task prefix for asymmetric or symmetric use cases. Source

Also in January 2026

Every AI model and API retirement in January 2026, on every provider and cloud

Questions

When does text-embedding-004 on Gemini API retire?
text-embedding-004 on Gemini API retired on January 14, 2026.
Can I still use text-embedding-004 on Gemini API?
No. It retired on January 14, 2026.
What replaces text-embedding-004 on Gemini API?
Its provider names gemini-embedding-2. Moving to it is more than a new model ID: its documentation lists 6 differences, on this page.

Source

ai.google.dev

text-embedding-004 | April 9, 2024 | January 14, 2026 | gemini-embedding-2

Data license: CC BY 4.0. From Google's documentation. Quotes are shortened and dates restated.

Does your code use it?

Paste a public repository. Since.dev analyzes it and shows the files and lines these dates hit.

Public repository. No sign-in.

A warm wave of orange and red light over deep blue

Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

See how out of date your code is.

Any public GitHub repository. No sign-in.

Tell your agent what changed since it was trained.

claude mcp add --transport http since https://api.since.dev/mcp

Codex, Cursor and any MCP client use https://api.since.dev/mcp.