Calculate the API cost of generating embeddings for a given amount of text.
Embedding APIs price by input token count, just like chat completion input tokens: total_cost = total_tokens × price_per_token. Unlike chat models, embedding models have no separate 'output' token cost since the output is a fixed-size vector rather than generated text. Embedding an entire corpus for RAG is typically a one-time (or periodic, on re-indexing) cost, which is usually far smaller than the ongoing cost of querying an LLM — but for very large corpora (millions of documents) it's still worth budgeting for upfront.
total_cost = total_tokens * (price_per_million / 1000000)
It's largely a one-time cost when you first index a corpus, though it recurs whenever you re-embed updated or newly added documents, or if you switch to a different/better embedding model and need to re-index everything.
The 'large' variant produces higher-dimensional, more accurate embeddings using a bigger underlying model, which costs more compute to run and is priced accordingly higher per token than the smaller, faster variant.
Use the Token Calculator on representative samples of your documents, then multiply the average tokens per document by your total document count, or sum tokens directly if you have exact text extracted.
Total token count embedded stays roughly the same regardless of chunk size (the same text gets embedded either way), but smaller chunks mean more separate embedding calls and vectors stored, which affects storage cost more than embedding cost.