# text-embedding-ada-002

OpenAI's second-generation embedding model that consolidated multiple specialized endpoints into one, producing 1536-dimensional vectors for search, classification, clustering, and recommendation systems.

- **Model ID:** `openai/text-embedding-ada-002`
- **Type:** embedding
- **Providers:** azure, openai
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** $0.10/1M input tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/text-embedding-ada-002

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { embed } from 'ai';

const result = await embed({
  model: 'openai/text-embedding-ada-002',
  value: 'Sunny day at the beach',
})
```

## About

text-embedding-ada-002 was released on December 15, 2022 as a major consolidation of OpenAI's embedding model lineup. Previously, OpenAI offered multiple first-generation embedding endpoints across different model sizes (Davinci, Curie, Babbage, Ada) and task types (similarity, search, classification). text-embedding-ada-002 unified all of these into a single model that produces 1536-dimensional vectors usable across search, clustering, classification, and recommendation tasks.

At launch, text-embedding-ada-002 was a substantial improvement over the first-generation models, outperforming the previous best (Davinci) on most benchmarks while being significantly cheaper and producing more compact vectors. It became the standard embedding model used by the majority of OpenAI API consumers.

The model has since been superseded by the text-embedding-3 family released in January 2024. text-embedding-3-small delivers higher MTEB scores at reduced cost with the same default 1536 dimensions, making it a direct upgrade path. text-embedding-3-large pushes accuracy further with 3072 dimensions and substantial multilingual improvements. For existing deployments that haven't yet migrated, text-embedding-ada-002 remains available and functional.

## What to consider

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

### 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

## 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

- **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

## 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.

## Links

- [Model page](https://vercel.com/ai-gateway/models/text-embedding-ada-002)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://platform.openai.com/docs/models/text-embedding-ada-002)
- [Provider pricing](https://platform.openai.com/docs/pricing)
