LLM API Cost Calculator

What does your AI agent actually cost?

Pick a model, set your agent's usage (including prompt caching), and see the per-token bill — live OpenRouter pricing — against Standard Compute's flat plan.

input
$5/1M
output
$25/1M
cached
$0.50/1M
Pricing from OpenRouter.
Requests / day150
Avg input tokens / request40k
Avg output tokens / request1k
Input served from cache50%
Claude Opus 4.8 · per-token
$630/mo
4,500 requests/mo · 50% cached
vs
Standard Compute · Economy
$39/mo
flat · no usage limits · standard speed
fast
slow
$591/mo saved — 16× cheaper, flat with no usage limits.

Every model at this usage

Monthly per-token cost (input/output + caching), cheapest first. Your selected model is highlighted.

ModelIn / Out /1MPer-token / movs Economy
DeepSeek V4 Flash · DeepSeek$0.14 / $0.28$17cheaper
Qwen3 235B A22B · Alibaba (Qwen)$0.09 / $0.55$19cheaper
Gemini 3.1 Flash Lite · Google$0.25 / $1.50$33cheaper
Codestral · Mistral$0.30 / $0.90$35cheaper
MiniMax M2.1 · MiniMax$0.30 / $1.20$36cheaper
DeepSeek V3.2 · DeepSeek$0.27 / $0.40$38cheaper
MiniMax M3 · MiniMax$0.30 / $1.20$39cheaper
Llama 4 Maverick · Meta$0.20 / $0.80$401.0×
Qwen3.7 Plus · Alibaba (Qwen)$0.32 / $1.28$411.1×
DeepSeek V4 Pro · DeepSeek$0.43 / $0.87$441.1×
Devstral 2 · Mistral$0.40 / $2$501.3×
GLM 4.7 · Z.AI$0.40 / $1.75$531.3×
Mistral Large 3 · Mistral$0.50 / $1.50$581.5×
GLM 4.6 · Z.AI$0.50 / $2$651.7×
GPT-5.6 Luna · OpenAI$0.50 / $3$661.7×
Kimi K2.6 · Moonshot AI$0.65 / $2.72$832.1×
DeepSeek R1 (0528) · DeepSeek$0.50 / $2.15$882.3×
GLM 5.2 · Z.AI$0.77 / $2.42$952.4×
Kimi K2.7 Code · Moonshot AI$0.73 / $3.50$982.5×
GPT-5.4 Mini · OpenAI$0.75 / $4.50$992.5×
Claude Haiku 4.5 · Anthropic$1 / $5$1263.2×
Grok 4.3 · xAI$1.25 / $2.50$1443.7×
Grok 4.20 · xAI$1.25 / $2.50$1443.7×
GPT-5.6 Terra · OpenAI$1.25 / $7.50$1644.2×
Qwen3.7 Max · Alibaba (Qwen)$1.48 / $4.42$1834.7×
Gemini 3.5 Flash · Google$1.50 / $9$1975.1×
GPT-5.3-Codex · OpenAI$1.75 / $14$2496.4×
Gemini 3.1 Pro · Google$2 / $12$2636.7×
GPT-5.4 · OpenAI$2.50 / $15$3298.4×
Claude Sonnet 4.6 · Anthropic$3 / $15$3789.7×
Claude Opus 4.8 · Anthropic$5 / $25$63016×
GPT-5.6 Sol · OpenAI$5 / $30$65717×
GPT-5.5 · OpenAI$5 / $30$65717×
Claude Fable 5 · Anthropic$10 / $50$1,26032×

Public OpenRouter per-token pricing (input + output, with your cache-hit rate applied where the model supports prompt caching). Standard Compute is flat with no usage limits within fair use; suggested plan scales with workload.

Stop watching the meter

Point any OpenAI-compatible agent at Standard Compute and the bill stops scaling with usage. One flat price, no usage limits, smart routing to a cost-efficient frontier model per request.

Get a free API key →See how it connects →

How LLM API pricing works

Every major LLM API — OpenAI, Anthropic (Claude), Google (Gemini), xAI (Grok) — bills per token. You pay for input tokens (your prompt, context, files) plus output tokens (what the model generates), each priced per million. Output usually costs 3–5× more than input. Many models also offer prompt caching, where repeated context is billed at a fraction of the input price.

That model punishes AI agents: they resend large context every step and fire background requests, so a single always-on agent can burn millions of tokens a day. This calculator estimates that monthly per-token bill across 30+ frontier models (live OpenRouter pricing, caching included) and compares it to a flat-rate plan with no usage limits where cost stops scaling with usage.

LLM API cost — FAQ

How do you calculate LLM API cost?

LLM API cost = (input tokens ÷ 1,000,000 × input price) + (output tokens ÷ 1,000,000 × output price), multiplied by your number of requests. Input (prompt) tokens and output (completion) tokens are usually priced differently, and output is typically 3–5× more expensive per token. This calculator does the math across 30+ models using live OpenRouter pricing.

How much does the OpenAI / Claude / Gemini API cost?

Per-token API pricing varies widely by model — from cents per million tokens for small open models to $15+ per million output tokens for frontier models like GPT-5.5 and Claude Opus. Pick any model above to see its exact per-token cost at your usage, or compare several side by side.

Why are AI agents so expensive to run?

Agents are input-token heavy: they resend large context (files, history, tool results) on every step, and background heartbeats, retries, and parallel tool calls multiply the request count. A single always-on agent can push millions of tokens a day, so per-token bills scale fast — which is why flat-rate pricing changes the economics for agent workloads.

What's the difference between input and output tokens?

Input (prompt) tokens are what you send to the model — your prompt, context, files, and message history. Output (completion) tokens are what the model generates back. Output tokens usually cost several times more than input tokens, so a chatty agent with long responses can be pricier than the request count suggests.

Is there an unlimited or flat-rate LLM API?

Yes — Standard Compute is an OpenAI-compatible API with no usage limits at a flat monthly price (from $39), instead of per-token billing. It auto-routes each request to a cost-efficient frontier model and, being flat-rate, adapts response speed under heavier load rather than charging more or throwing rate limits. That's what the comparison above shows.

Does prompt caching reduce LLM API costs?

Yes — a lot, for agents. Many models bill repeated input (system prompt, context, files you resend every step) at a discounted cache-read rate, often around 10% of the normal input price. Since agents resend large context constantly, a high cache-hit rate can cut the input portion of the bill dramatically. This calculator lets you set your cache-hit rate and applies the model's cache-read price where the model supports it.

How many tokens does an AI agent use?

It depends on context size and how often it runs, but agent inputs commonly range from ~10,000 tokens up to 1,000,000+ per request for large-context or codebase-aware agents, with outputs from a few hundred to a few thousand tokens. Set your real numbers on the sliders above to estimate the bill.