Okapi Okapi

Gemini API · Model retirement

text-embedding-004

Stopped working

Calls to the model text-embedding-004 on Gemini API stopped working on January 14, 2026.

What to use instead of text-embedding-004

Move to gemini-embedding-2, recommended by Google.

Google: the embedding spaces of gemini-embedding-001 and gemini-embedding-2 are incompatible, so you must re-embed all of your existing data. task_type is not supported; put the task in the prompt.

Facts

API
Gemini API generativelanguage.googleapis.com
Model
text-embedding-004
Kind
Model retirement
Takes effect
January 14, 2026
Calls after that day
Fail
Source
Deprecations page
Last updated

text-embedding-004 on other APIs

More from Gemini API

Know before your API calls break.

Okapi finds the calls a breaking change hits in your code and opens the pull request that fixes them.

Add to GitHub