RAG app API cost

110/128 prices match the official page, 102 match models.devSynced 2026-11-24 01:00 UTC · Method

In a RAG app almost every token is input: each question carries the retrieved chunks, so in our example a request has 8,000 input tokens but only 600 output tokens, at 2,000 questions a day. Only the stable part (instructions and often-retrieved passages) can be cached; we assume 30% read from the cache. Turning your documents into vectors is a separate, mostly one-off cost: see embedding prices.

Sending whole documents instead of top-k chunks changes the bill completely. With 300,000-token prompts, Muse Ember 1.0 goes from $66.00 to $5,454 a month, because above 200K tokens the whole request is billed at its long-context rate; caching 80% of the document, as in a chat-with-your-files app where users ask several questions about the same file, brings it to $1,307. With whole documents the cheapest model here becomes Doubao Seed 2.1 Lite 260915 at $2,084.

The table shows the cheapest current models for each scenario; models whose context window is too small are left out of the whole-document columns. Thresholds per model: long-context pricing. Add embeddings and your vector DB with the RAG cost calculator.

Estimated monthly cost by workload (USD)
ModelTop-k retrieval
2,000 req/day · 8,000 in · 600 out
Calculate with your numbers →
Top-k + caching
2,000 req/day · 8,000 in · 600 out · cache 30%
Calculate with your numbers →
Whole document
2,000 req/day · 300,000 in · 600 out
Calculate with your numbers →
Whole document + caching
2,000 req/day · 300,000 in · 600 out · cache 80%
Calculate with your numbers →
Ministral 3b (latest)$51.60/mo$38.64/mo$1,804/mo
exceeds context
$508/mo
exceeds context
Muse Ember 1.0$66.00/mo$52.18/mo$5,454/mo
long-context rate
$1,307/mo
long-context rate
Claude Haiku 5.5$66.00/mo$53.64/mo$9,090/mo
long-context rate
$2,722/mo
long-context rate
Doubao Seed 2.1 Lite 260915$69.17/mo$55.92/mo$2,084/mo$759/mo
MiMo V2.6 Flash$77.28/mo$57.52/mo$2,530/mo$554/mo
Qwen3.8 Flash$88.92/mo$70.82/mo$2,717/mo$832/mo
MiniMax M3.1 Flash$93.60/mo$74.16/mo$2,722/mo$778/mo

Estimates from published per-token rates; check official pricing before budgeting. Data synced from the LiteLLM price list 2026-11-24 01:00 UTC.

Adding the embedding bill

Indexing is mostly one-off: embedding 10,000 pages (about 5 million tokens) with the cheapest model in our data, text-embedding-3-small (OpenAI), costs $0.10, paid again only for documents that change. Embedding each question at about 100 tokens adds $0.12 a month at this traffic. Both are small next to the $66.00 a month that Muse Ember 1.0 spends answering, so optimize the generation side first. Prices per model: embedding API pricing.

FAQ

How many chunks should I retrieve?

As few as keep answers correct. Every extra chunk is billed on every question, so four times the chunks means roughly four times the retrieved part of the input. Measure answer quality at a few values of k before settling.

Is a long-context model cheaper than RAG?

Rarely at scale. Sending a whole document costs far more input per question than a few retrieved chunks, and some models charge a higher rate above a size threshold. It can make sense at low traffic, or when the same document is cached and questioned many times.

How big should a chunk be?

A few hundred tokens is the usual range: large enough to hold a complete idea, small enough that top-k stays cheap. Chunk size times k is the retrieved input on every question, so halving the chunk size at the same k halves that part of the bill; check answer quality at each setting.