Use case calculator

RAG app API Cost Calculator

Compare model costs for retrieval augmented generation apps with longer prompts and structured answers.

Cheapest eligibleCalculating
Balanced optionCalculating
CoverageCalculating
Provider / modelEstimated monthly costUnit priceContextRate limitSignal

Excluded by your requirements

Provider / modelStatusReason

How to Read This Estimate

The preset starts with realistic monthly usage assumptions for rag app. Adjust tokens, request rate, context window, and required capabilities to match your product before choosing a provider.

Recommended Starting Points

Lowest listed unit cost

Groq Llama 3.1 8B Instant

$0.05 input and $0.08 output per 1M tokens.

Balanced comparison pick

Google Gemini Gemini 2.0 Flash

$0.1 input and $0.4 output per 1M tokens.

Useful alternative

OpenAI GPT-4o mini

$0.15 input and $0.6 output per 1M tokens.

Pricing Details

ProviderModelCategoryPricingContextCapabilities
OpenAI GPT-4o mini llm $0.15 input / $0.6 output 128,000 streaming json mode tool calling batch api
OpenAI GPT-4o llm $2.5 input / $10 output 128,000 streaming json mode tool calling batch api
Anthropic Claude 3.5 Haiku llm $0.8 input / $4 output 200,000 streaming json mode tool calling batch api
Anthropic Claude 3.7 Sonnet llm $3 input / $15 output 200,000 streaming json mode tool calling batch api
Google Gemini Gemini 2.0 Flash llm $0.1 input / $0.4 output 1,000,000 streaming json mode tool calling batch api
Google Gemini Gemini 1.5 Pro llm $1.25 input / $5 output 2,000,000 streaming json mode tool calling batch api
DeepSeek DeepSeek Chat llm $0.27 input / $1.1 output 64,000 streaming json mode tool calling
DeepSeek DeepSeek Reasoner llm $0.55 input / $2.19 output 64,000 streaming json mode
Mistral AI Mistral Small llm $0.2 input / $0.6 output 32,000 streaming json mode tool calling batch api
Mistral AI Mistral Large llm $2 input / $6 output 128,000 streaming json mode tool calling batch api
Cohere Command R llm $0.15 input / $0.6 output 128,000 streaming json mode tool calling
Together AI Llama 3.1 70B llm $0.88 input / $0.88 output 128,000 streaming json mode tool calling
Together AI Mixtral 8x7B llm $0.6 input / $0.6 output 32,000 streaming
Groq Llama 3.1 8B Instant llm $0.05 input / $0.08 output 128,000 streaming json mode tool calling
Groq Llama 3.3 70B Versatile llm $0.59 input / $0.79 output 128,000 streaming json mode tool calling
Perplexity Sonar llm $1 input / $1 output 128,000 streaming json mode
xAI Grok 2 llm $2 input / $10 output 131,072 streaming json mode tool calling

Limits and Notes

Prices can change and rate limits are often account-tier specific. Use this calculator for planning, then confirm final numbers on the official provider pages before committing budget.

FAQ

How is monthly cost calculated?

For token APIs, monthly cost is input tokens times input price plus output tokens times output price. For TTS, it uses monthly characters. Vector database estimates depend more heavily on storage and read/write usage.

Why are some models excluded?

The calculator excludes models that do not satisfy required context window, requests per minute, streaming, JSON mode, or tool calling constraints.

Are these prices guaranteed?

No. The dataset is designed for comparison and should be checked against official pricing pages before production decisions.

Data Sources and Last Checked

Related Category

LLM API pricing