AI and API bills get out of control because the pricing is confusing — tokens, context windows, per-request fees, egress. These guides explain how it actually works in plain terms, and each one links to a free calculator so you can plug in your own numbers.
Guides
How LLM API Pricing Works
Tokens, input vs output, context windows — why the same task can cost 50× more on one model than another.
How to Cut Your LLM API Bill
The seven levers that actually reduce cost: caching, routing, batching, RAG, cheaper models and more.
What Is a Token? (And Why You're Billed by It)
A plain-English guide to LLM tokens: what they are, how text becomes tokens, why input and…
Prompt Caching: How to Cut Repeat-Call Costs
Learn how prompt caching works, when it saves money, typical discount tiers, and the design…
The Batch API: 50% Off for Non-Urgent Jobs
How batch APIs give you a large discount, typically around 50%, in exchange for slower…
What Fine-Tuning Actually Costs
A clear breakdown of fine-tuning costs: the one-time training charge, higher per-token…
Self-Hosting an LLM vs Paying Per API Call
An honest cost and effort comparison of running your own open model on GPUs versus using a…
Context Windows and Why Long Prompts Get Expensive
Understand context windows, how every token in the window is billed on each call, why long…
Tokens vs Requests Explained
What a token really is, how it differs from an API request, and how to estimate both before you build.
How to Choose an LLM
Match model tier to task — the 10–50× cost swing between flagship and nano.
Guide →RAG vs Fine-Tuning
Cost, trade-offs and when each wins — with a worked comparison.
Guide →API Rate Limits
RPM, TPM and throughput — how many users your limits can serve.
Guide →API Cost Glossary
40 AI & API cost terms in plain English — tokens, caching, TPM and more.
Reference →Popular calculators
LLM Token Cost
Exact cost of a prompt + completion on any model.
Prompt Caching Savings
How much caching your system prompt saves.
Model Routing Savings
Route easy calls to cheap models, hard calls to strong ones.
Self-Host vs API
When running your own GPU beats paying per token.
Frequently asked questions
Where do most AI API bills actually go over budget?
Usually not the sticker price — it's context growth. Chat and agent apps resend the entire conversation history on every turn, so a 20-turn conversation costs far more per message than the first one even though the per-token price never changed. Track cumulative context size per session, not just request count.
How do I estimate my API cost before launching a product?
Measure real prompts instead of guessing. Run 20–50 representative requests through the model you're evaluating, read the actual input/output token counts most SDKs return in the response, then multiply by expected daily volume and the model's per-million-token price. Add 30–50% headroom for verbose edge cases and retries.
Is switching to a cheaper model always worth it?
Only if it clears your quality bar for that specific task. A model that's 5× cheaper but needs two retries per request to produce a usable answer can end up costing more, and burns latency too. Test cheaper models against your own prompts and an eval, not a generic benchmark leaderboard.
Do rate limits (RPM/TPM) affect my bill?
No — rate limits cap throughput, not cost. Hitting a limit means requests queue or fail; it doesn't change what you pay for the tokens you do send. Budgeting and rate-limit capacity planning are separate problems that need separate math.
How often do AI API prices change?
Often. Frontier labs cut per-token prices every few months as models get more efficient and competition increases, and older models get discounted or deprecated once a newer version ships. Re-check pricing on a recurring schedule rather than assuming last quarter's numbers still hold.
Educational reference only — prices are estimates; confirm current rates on each provider's pricing page.