text-embedding-ada-002
text-embedding-ada-002 is OpenAI's second-generation embedding model that unified multiple prior embedding endpoints into a single model, producing 1536-dimensional vectors suitable for search, clustering, classification, and recommendations.
import { embed } from 'ai';
const result = await embed({ model: 'openai/text-embedding-ada-002', value: 'Sunny day at the beach',})What To Consider When Choosing a Provider
Zero Data Retention
AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.Authentication
AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
text-embedding-ada-002 has been succeeded by the text-embedding-3 family, which offers both better performance and lower cost. For new projects, text-embedding-3-small is a drop-in replacement with higher quality at reduced cost.
If your vector database is already indexed with ada-002 embeddings, note that you cannot mix embeddings from different models in the same index. Migration requires re-embedding your corpus.
When to Use text-embedding-ada-002
Best For
Existing deployments:
Applications with vector indexes already built on ada-002 embeddings that can't yet re-index
Legacy pipeline maintenance:
Systems that depend on ada-002's specific embedding characteristics
Backward compatibility:
Workflows pinned to ada-002 for consistency with historical data
Migration baselines:
Benchmarking against ada-002 when evaluating newer embedding models
Consider Alternatives When
New projects:
Text-embedding-3-small delivers higher quality at reduced cost with the same 1536-dimension default
Maximum quality:
Text-embedding-3-large for the highest accuracy on retrieval-critical workloads
Multilingual retrieval:
Both text-embedding-3 variants significantly outperform ada-002 on MIRACL
Cost optimization:
Text-embedding-3-small offers immediate savings with no quality regression
Conclusion
text-embedding-ada-002 was the standard OpenAI embedding model for over a year, consolidating a fragmented lineup into a single practical endpoint. While newer models now offer better performance and lower cost, it remains available through AI Gateway for existing deployments that haven't yet migrated.
FAQ
No. text-embedding-3-small is a direct upgrade: higher quality, lower cost, and the same default 1536-dimension output. Use the newer model for new projects.
No. Embeddings from different models are not compatible. Migration requires re-embedding your entire corpus with the new model.
1536 dimensions, fixed. Unlike the text-embedding-3 family, ada-002 does not support the dimensions parameter for flexible vector sizes.
text-embedding-3-small scores 1.3 points higher on MTEB (62.3% vs 61.0%) and 12.6 points higher on MIRACL (44.0% vs 31.4%), at lower cost.
AI Gateway accepts a single API key or OIDC token for all requests. You don't embed OpenAI credentials in your application; AI Gateway routes and authenticates on your behalf.
This page shows live throughput and time-to-first-token metrics measured across real AI Gateway embedding traffic.