Skip to content

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.

index.ts
import { embed } from 'ai';
const result = await embed({
model: 'openai/text-embedding-ada-002',
value: 'Sunny day at the beach',
})

Frequently Asked Questions

  • Should I use text-embedding-ada-002 for a new project?

    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.

  • Can I mix ada-002 and text-embedding-3 vectors in the same index?

    No. Embeddings from different models are not compatible. Migration requires re-embedding your entire corpus with the new model.

  • What is the output dimension of text-embedding-ada-002?

    1536 dimensions, fixed. Unlike the text-embedding-3 family, ada-002 does not support the dimensions parameter for flexible vector sizes.

  • How does text-embedding-ada-002 compare to text-embedding-3-small on benchmarks?

    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.

  • How does AI Gateway handle authentication for text-embedding-ada-002?

    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.

  • What are typical latency characteristics?

    This page shows live throughput and time-to-first-token metrics measured across real AI Gateway embedding traffic.