AIKit
RAG Tools

Embeddings Explained for Developers

What embeddings are, how embedding pricing works, and how costs scale.

An embedding is a numerical vector that represents the meaning of a piece of text, produced by an embedding model. Retrieval-augmented generation (RAG) systems embed documents once (or periodically) and embed queries at request time, then compare vectors to find relevant content.

How embedding cost scales

Embedding models are typically priced per million tokens, similar to LLMs, but without a separate output price — you pay once per token embedded.

Formula
total tokens = documents × avg tokens/document × max(1, re-indexes) cost = (total tokens / 1,000,000) × price per million tokens

Initial indexing vs. re-indexing

The first time you embed a document set, that's a one-time cost proportional to total document tokens. If your source documents change — new uploads, edits, deletions — you'll need to re-embed some or all of them periodically. Re-indexing frequency has a direct, linear effect on ongoing embedding cost.

What embedding cost doesn't include

Vector database storage and query costs are separate from embedding generation cost, and vary widely by provider and index configuration. Our AI Project Cost Calculator lets you add your own infrastructure estimate alongside embedding and LLM costs to get a full picture.

Try the Embedding Cost Calculator to estimate cost for your own document set.