World of the Developers
All guides
AI

Embedding Costs Explained: What It Takes to Index Your Data

October 28, 2026 · 5 min read

Embeddings turn text into lists of numbers that capture its meaning, which is what makes semantic search and retrieval possible. They're among the cheapest AI operations you can buy — but the cost isn't zero, and it can add up for large or constantly changing datasets.

How embeddings are priced

Embedding models are billed per input token. There are no output tokens, because the result is a vector rather than generated text. Per-million-token prices are typically much lower than those for text-generation models, so the embedding step is rarely the largest line in an AI bill.

A worked example

Prices below are illustrative — use your provider's current rate. Say you have 500,000 documents averaging 400 tokens each. That's 500,000 × 400 = 200 million tokens. At $0.10 per million tokens, indexing costs 200 × $0.10 = $20.

Each search query also has to be embedded. A 20-token question at the same rate costs a tiny fraction of a cent, so even 1 million queries (20 million tokens) comes to about $2.

What changes the cost

Several decisions move the number more than the per-token price:

  • Corpus size — the main driver; cost scales directly with total tokens.
  • Chunking — overlapping chunks repeat text, so heavy overlap means embedding the same content more than once.
  • Re-indexing frequency — re-embedding everything on a schedule multiplies the cost, while updating only changed documents keeps it low.
  • Model choice — larger, higher-quality embedding models cost more per token.

Costs beyond the embedding call

Vectors have to be stored and searched. Higher-dimension embeddings take more storage and can make searches slower and more expensive in a managed vector database. Factor that in alongside the token cost, since it often recurs every month while the embedding bill is mostly one-off.

Practical habits

A few habits keep embedding spend low without hurting search quality:

  • Track a hash of each document so only changed content is re-embedded.
  • Remove boilerplate (navigation, footers, legal text) before embedding.
  • Use batch endpoints where available — they are often discounted.
  • Test a smaller embedding model on your own queries before assuming you need the largest one.

Estimate your indexing cost

Our Embedding Cost Calculator takes your document count, average length, and price per million tokens and returns the one-off indexing cost, so you can size a project before building it.

Try the calculator

Embedding Cost Calculator