Cost calculator

LLM API cost calculator

Estimate monthly API spend from model pricing, input tokens, output tokens, and monthly request volume. Prices change often, so treat this as scenario planning and verify official pricing before purchase.

Workload calculators

Start with a practical cost scenario

Use editable assumptions designed around common production workloads, then compare every compatible model.

Estimated monthly cost
$0.00

$0.00 per 1,000 requests

Active pricing profile: calculating...

Cheapest included option: calculating...

ProviderModelProfileMonthly estimatePer 1,000 requestsSource
View pricing sources
How StackLens verifies data and calculates cost

OpenAI GPT-4o miniHigh confidenceChecked 2026-07-13

Official OpenAI model documentation lists standard input, cached-input, and output token prices.

OpenAI GPT-4oHigh confidenceChecked 2026-07-13

Official OpenAI model documentation lists standard input, cached-input, and output token prices.

OpenAI GPT-5.6 SolHigh confidenceChecked 2026-07-13

Official OpenAI model documentation lists standard pricing and the higher rate applied when input exceeds 272,000 tokens.

OpenAI GPT-5.6 TerraHigh confidenceChecked 2026-07-13

Official OpenAI model documentation lists standard pricing and the higher rate applied when input exceeds 272,000 tokens.

OpenAI GPT-5.6 LunaHigh confidenceChecked 2026-07-13

Official OpenAI model documentation lists standard pricing and the higher rate applied when input exceeds 272,000 tokens.

OpenAI gpt-5.4-miniHigh confidenceChecked 2026-07-13

Official OpenAI model documentation lists standard input, cached-input, and output token prices.

OpenAI gpt-5.4-nanoHigh confidenceChecked 2026-07-13

Official OpenAI model documentation lists standard input, cached-input, and output token prices.

Anthropic Claude Sonnet 5High confidenceChecked 2026-07-12

Introductory pricing is tracked through 2026-08-31. Standard pricing starts 2026-09-01 and is stored as future pricing.

Anthropic Claude Opus 4.8High confidenceChecked 2026-07-12

Official Anthropic standard, batch, and fast mode prices are stored. Standard pricing is the calculator default.

Anthropic Claude Sonnet 4.6High confidenceChecked 2026-07-12

Anthropic official pricing page lists Claude Sonnet 4.6 at $3 / MTok input and $15 / MTok output, with cache write and cache hit prices tracked.

Anthropic Claude Haiku 4.5High confidenceChecked 2026-07-12

Anthropic official pricing page lists Claude Haiku 4.5 at $1 / MTok input and $5 / MTok output, with cache write and cache hit prices tracked.

Google Gemini 2.5 ProHigh confidenceChecked 2026-07-12

Gemini 2.5 Pro uses the <=200k token standard tier by default and automatically switches to the >200k tier in the calculator. Output price includes thinking tokens.

Google Gemini 2.5 FlashHigh confidenceChecked 2026-07-12

Gemini 2.5 Flash standard text/image/video input, audio input, output including thinking tokens, context caching, and cache storage prices are tracked.

Google Gemini 2.5 Flash-LiteHigh confidenceChecked 2026-07-12

Official stable Gemini 2.5 Flash-Lite pricing is tracked. Standard text/image/video pricing is the calculator default.

Google Gemini 2.5 Flash-Lite PreviewMedium confidenceChecked 2026-07-12

Preview model retained for historical/source tracking. Use stable Gemini 2.5 Flash-Lite for default estimates unless the preview model is specifically required.

DeepSeek DeepSeek V4 ProHigh confidenceChecked 2026-07-12

DeepSeek V4 Pro defaults to cache-miss input pricing. Cache-hit pricing is stored but only used when a cache-hit percentage is supplied.

DeepSeek DeepSeek V4 Flash non-thinkingHigh confidenceChecked 2026-07-12

DeepSeek V4 Flash defaults to cache-miss input pricing. Cache-hit pricing is stored but only used when a cache-hit percentage is supplied.

Anthropic Claude Fable 5High confidenceChecked 2026-07-14

Official Anthropic pricing and Fable 5 launch documentation track token rates, cache rates, context limits, availability, and refusal behavior.

Anthropic Claude Mythos 5High confidenceChecked 2026-07-14

Official Anthropic pricing, model overview, and launch documentation track Mythos 5 token rates, cache rates, limits, Project Glasswing availability, and the distinction from Fable 5 safety classifiers.

Google Gemini 3.5 FlashHigh confidenceChecked 2026-07-14

Official Gemini pricing and model detail pages are parsed independently; Models API availability is optional.

Google Gemini 3 Flash PreviewHigh confidenceChecked 2026-07-14

Official Gemini pricing and model detail pages are parsed independently; Models API availability is optional.

Google Gemini 3.1 Flash-LiteHigh confidenceChecked 2026-07-14

Official Gemini pricing and model detail pages are parsed independently; Models API availability is optional.

Google Gemini 3.1 Pro PreviewHigh confidenceChecked 2026-07-14

Official Gemini pricing and model detail pages are parsed independently; Models API availability is optional.

Groq GPT-OSS 20B on GroqHigh confidenceChecked 2026-07-15

Groq's official model page lists the GroqCloud API identifier, input, cached-input and output rates, context window, maximum output, modalities, and supported capabilities. OpenAI is the model creator; GroqCloud is the tracked API access provider.

Groq GPT-OSS 120B on GroqHigh confidenceChecked 2026-07-15

Groq's official model page lists the GroqCloud API identifier, input, cached-input and output rates, context window, maximum output, modalities, and supported capabilities. OpenAI is the model creator; GroqCloud is the tracked API access provider.

Groq Llama 4 Scout on GroqHigh confidenceChecked 2026-07-15

Groq's official model page lists the GroqCloud API identifier, input and output rates, preview status, context window, maximum output, text-and-image input, and supported capabilities. Meta is the model creator; GroqCloud is the tracked API access provider.

Groq Qwen3-32B on GroqHigh confidenceChecked 2026-07-15

Groq's official model page lists the GroqCloud API identifier, input and output rates, preview status, context window, maximum output, text modality, and supported reasoning and tool capabilities. Alibaba Cloud is the model creator; GroqCloud is the tracked API access provider.

Google Gemini 1.5 FlashHigh confidenceChecked 2026-07-17

Google's official August 2024 update gives the before-and-after short-context, long-context, and cached-input prices. Google records the Gemini 1.5 API shutdown on September 29, 2025.

Google Gemini 1.5 ProHigh confidenceChecked 2026-07-17

Google's official September 2024 update gives the before-and-after short- and long-context prices effective October 1, 2024. Google records the Gemini 1.5 API shutdown on September 29, 2025.

Cohere Command R 08-2024High confidenceChecked 2026-07-17

Cohere's official model page lists the live API identifier, token prices, context window, maximum output, knowledge cutoff, and supported enterprise workflow capabilities.

Cohere Command R+ 08-2024High confidenceChecked 2026-07-17

Cohere's official model page lists the live API identifier, token prices, context window, maximum output, knowledge cutoff, and supported multi-step tool-use capabilities.

Cohere Command AHigh confidenceChecked 2026-07-17

Cohere's official Command A page lists $2.50 input and $10 output per million tokens, a 256K context window, an 8K maximum output, image inputs, and the command-a-plus-05-2026 API model ID.

Mistral Mistral Medium 3.5High confidenceChecked 2026-07-17

Mistral's official model card lists the mistral-medium-3-5 API ID, $1.50 input and $7.50 output per million tokens, a 256K context window, multimodal support, and the supported API features. Mistral's API documentation separately states cached input is billed at 10% and Batch at 50% of standard rates.

Moonshot AI Kimi K3High confidenceChecked 2026-07-17

Kimi's official K3 pricing page lists $3 input, $0.30 cached input, and $15 output per million tokens. The official model and parameter documentation lists the kimi-k3 API identifier, native visual input, reasoning controls, and a 1,048,576-token context window.

Moonshot AI Kimi K2.7 CodeHigh confidenceChecked 2026-07-17

Kimi's official pricing page lists $0.95 input, $0.19 cached input, and $4 output per million tokens for kimi-k2.7-code. Official model documentation lists a 262,144-token context window and the model's reasoning constraints.

Moonshot AI Kimi K2.7 Code High-SpeedHigh confidenceChecked 2026-07-17

Kimi's official pricing page lists $1.90 input, $0.38 cached input, and $8 output per million tokens for kimi-k2.7-code-highspeed. Official documentation identifies it as the higher-speed variant with the same model constraints and context window.

Moonshot AI Kimi K2.6High confidenceChecked 2026-07-17

Kimi's official pricing page lists $0.95 input, $0.16 cached input, and $4 output per million tokens for kimi-k2.6. Official model documentation lists visual and text input, switchable reasoning, and a 262,144-token context window.

xAI Grok 4.5High confidenceChecked 2026-07-17

Official xAI pricing lists Grok 4.5 at $2 input, $0.50 cached input, and $6 output per million tokens below 200K prompt tokens; requests at or above that threshold use $4 input, $1 cached input, and $12 output. The official model page lists a 500,000-token context window, text and image input, function calling, structured outputs, and reasoning.

Common cost drivers

Long prompts, long responses, retries, agent loops, hidden background jobs, and sending the same context repeatedly can dominate monthly cost.

Source notes

Pricing data lives in JSON so it can be updated as provider rates change. Verify model rates against official provider pages before making buying decisions.

FAQ

Questions teams ask before choosing

How accurate is this LLM API cost calculator?

It is a planning estimate using editable pricing data. Verify official provider pricing before making a purchase decision.

What usually drives monthly LLM API cost?

Request volume, output length, retries, long system prompts, context stuffing, and using premium models for routine tasks usually drive spend.

How should teams reduce LLM API costs?

Route simple requests to cheaper models, cache repeated context, cap output tokens, and measure cost by feature instead of only by provider.