The comprehensive pricing and accuracy guide for dense vector embeddings. Compare cost per 1M tokens, MTEB retrieval benchmarks, and dimension reduction tradeoffs.
| Model Name | Cost / 1M Tokens | Vector Dimensions | Max Context (Tokens) | MTEB Retrieval Score | Storage Cost Impact | Best For |
|---|---|---|---|---|---|---|
| OpenAI text-embedding-3-small | $0.020 | 1536 (or 512) | 8,191 | 62.3% | Very Low (truncatable) | General purpose search, massive datasets |
| Google text-embedding-004 | $0.025 | 768 | 2,048 | 63.1% | Low (native 768 dims) | Google Cloud native RAG pipelines |
| Voyage AI voyage-3-lite | $0.070 | 512 | 32,000 | 65.8% | Lowest (512 dims) | Long context documents & legal RAG |
| Cohere Embed v3 (int8) | $0.100 | 1024 | 512 | 64.5% | Ultra-Low (int8 quantized) | Enterprise compliance & compressed storage |
| Voyage AI voyage-3 | $0.120 | 1024 | 32,000 | 68.2% | Moderate | Frontier retrieval, zero hallucination RAG |
| OpenAI text-embedding-3-large | $0.130 | 3072 (or 1024) | 8,191 | 64.6% | High (3072 dims) | Deep multi-lingual semantic matching |
Developers frequently obsess over whether embeddings cost $0.02/M or $0.10/M. In reality, generating 10 million tokens of embeddings costs between $0.20 and $1.00 as a one-time API fee.
The ongoing recurring cost is storing those vectors in memory inside Pinecone, Qdrant Cloud, or pgvector. A 3,072-dimension vector takes 4x more RAM and disk space than a 768-dimension vector. By choosing OpenAI text-embedding-3-small truncated to 512 dimensions or Voyage-3-lite (native 512 dimensions), your monthly vector database hosting bill drops by 75%.
Compare monthly vector generation costs across OpenAI text-embedding-3-small ($0.02/M), Voyage-3 ($0.12/M), and Cohere Embed v3 ($0.10/M).
Python script combining low-cost vector indexing with cross-encoder reranking for maximum precision.
import os
from openai import OpenAI
import voyageai
openai_client = OpenAI()
voyage_client = voyageai.Client(api_key=os.environ["VOYAGE_API_KEY"])
def generate_dense_embeddings(chunks: list[str]):
"""Generate vectors for $0.020/1M tokens using OpenAI small."""
res = openai_client.embeddings.create(
model="text-embedding-3-small",
input=chunks,
dimensions=512 # Truncate to 512 to reduce vector DB storage RAM by 66%
)
return [d.embedding for d in res.data]
def rerank_candidates(query: str, candidates: list[str], top_k: int = 5):
"""Re-rank top 50 vector candidates with Voyage rerank-2."""
rerank_res = voyage_client.rerank(
query=query,
documents=candidates,
model="rerank-2",
top_k=top_k
)
return [r.document for r in rerank_res.results]
Avoid common indexing traps that increase vector database RAM bills and degrade search recall.
Storing 1536-dimensional float32 vectors takes 6 KB per vector. Storing 10M vectors requires 60 GB of RAM. Use OpenAI dimension reduction (512-dim) or scalar quantization to cut RAM by 75%.
Models like Voyage AI and Cohere require explicit input_type='document' during indexing and input_type='query' during search. Mismatching types drops retrieval recall by over 30%.
If a document chunk exceeds the model token ceiling (8k on OpenAI, 32k on Voyage), excess tokens are silently dropped. Always enforce strict character chunking with overlap before embedding.
You cannot mix vectors from different embedding model versions (e.g. ada-002 and text-embedding-3) in the same index. Switching models requires re-embedding your entire document corpus.
Explore vector databases and retrieval optimization calculators across our index.
Detailed MTEB retrieval scores and cost benchmarks.
Serverless pay-per-query vs dedicated Rust vector nodes.
Explore $0.33/GB storage and Read Unit economics.
Calculate when RAG retrieval is cheaper than raw prompt context.
Calculating the true cost of an embedding pipeline requires looking beyond raw ingestion API pricing ($/M tokens) to include vector database RAM consumption. In high-dimensional vector spaces, a 10-million document corpus indexed with OpenAI's `text-embedding-3-large` (3,072 dimensions, float32) requires over 122 GB of uncompressed memory. Hosting that vector index on AWS or managed vector databases costs $400 to $800/month. By leveraging Matryoshka Representation Learning (MRL) to truncate vectors to 512 dimensions or adopting lightweight embedding models like `text-embedding-3-small` (1,536 dim, $0.02/M) or Voyage AI, teams cut total retrieval TCO by 70% with less than 1.5% drop in retrieval recall.
| Model | Dimensions | API Cost / 1M Tokens | Ingestion Cost (5B Tokens) | Index RAM Size | Vector DB Monthly Host |
|---|---|---|---|---|---|
| OpenAI text-embedding-3-small | 1,536 (or 512 MRL) | $0.020 | $100.00 | 20.5 GB (at 512 dim) | $85.00 |
| Voyage AI (voyage-3-lite) | 512 | $0.020 | $100.00 | 20.5 GB | $85.00 |
| OpenAI text-embedding-3-large | 3,072 | $0.130 | $650.00 | 122.8 GB | $480.00 |
| Self-Hosted BGE-M3 (TEI / GPU) | 1,024 | $0.004 (Compute) | $20.00 (VPS) | 41.0 GB | $160.00 |
import OpenAI from 'openai';
const openai = new OpenAI();
// Truncate embeddings to 512 dimensions while maintaining cosine distance validity
export async function getMatryoshkaEmbedding(text: string): Promise {
const response = await openai.embeddings.create({
model: 'text-embedding-3-small',
input: text,
dimensions: 512 // Server-side Matryoshka truncation cuts RAM footprint by 66%
});
return response.data[0].embedding;
}
On the MTEB benchmark, truncating `text-embedding-3-small` from 1,536 to 512 dimensions reduces retrieval accuracy by less than 1.2%, while cutting vector index memory storage and query latency by over 60%.
Self-hosting TEI on an Nvidia L4 GPU instance ($0.65/hr on RunPod or GCP) makes sense when ingesting over 500 million tokens per month. A single L4 running BGE-M3 or BAAI/bge-small can embed 12,000 tokens per second, driving effective ingestion costs down to $0.004 per million tokens.