text-embedding-3-small
text-embedding-3-small delivers higher MTEB scores than ada-002 at lower cost, with a 1536-dimension default that drops into existing pipelines and a flexible dimensions parameter for further storage savings.
import { embed } from 'ai';
const result = await embed({ model: 'openai/text-embedding-3-small', value: 'Sunny day at the beach',})What To Consider When Choosing a Provider
- Configuration: Because the default output is 1536 dimensions, identical to ada-002, you can swap models without touching your vector database schema or index configuration.
- 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.
When to Use text-embedding-3-small
Best For
- Ada-002 drop-in replacement: No schema changes and immediate cost savings with the same 1536-dimension default
- Real-time RAG pipelines: Query-time embedding where latency and cost per request matter
- High-volume indexing: Document pipelines where the reduced cost yields significant infrastructure savings
- Multilingual retrieval: Applications that benefit from the 12.6-point MIRACL improvement over ada-002
- Budget-conscious projects: Embedding quality is important but not the absolute ceiling
Consider Alternatives When
- Retrieval accuracy bottleneck: The 2.3-point MTEB gap versus text-embedding-3-large is material for your use case
- Heavily multilingual corpus: The larger model's 54.9% MIRACL score versus 44.0% would produce meaningfully better results
- Maximum dimensionality: Specialized downstream models need the full 3072-dimension vectors from text-embedding-3-large
Conclusion
text-embedding-3-small is the practical default embedding model for most applications on AI Gateway. It costs less than ada-002, performs better, and drops in without migration pain. Start here unless you have a specific reason to pay for the large variant's extra accuracy.
Frequently Asked Questions
Is text-embedding-3-small a direct replacement for ada-002?
Yes. The default output is 1536 dimensions, same as ada-002, so existing vector indexes work without rebuilding. You get a higher MTEB score and immediate cost savings.
How much does the multilingual retrieval improve over ada-002?
MIRACL scores go from 31.4% to 44.0%. For pipelines that handle queries or documents in multiple languages, this is a meaningful quality improvement that comes free with the model swap.
When does it make sense to pay for text-embedding-3-large instead?
When your application's quality is bottlenecked by embedding accuracy, for example, legal search, scientific literature retrieval, or high-stakes recommendation systems where a 2-point MTEB difference translates to noticeably better results.
Can I reduce the vector dimensions below 1536?
Yes. The
dimensionsparameter accepts any value below the default. Matryoshka training ensures the truncated vectors retain useful semantic structure, which is helpful for reducing storage costs in large indexes.What are typical latency characteristics?
This page shows live throughput and time-to-first-token metrics measured across real AI Gateway embedding traffic.