LLM API pricing, frequently asked questions
Straight answers to the questions developers ask most about AI model pricing. For today's exact numbers, use the live calculator.
What is a token?
A token is a small chunk of text a model reads and writes, usually a short word, part of a word, or punctuation. In English, one token is roughly three-quarters of a word, so 1,000 tokens is about 750 words. Providers bill per token, quoted per million. More detail in what is a token.
How is LLM API pricing calculated?
You pay separately for input tokens (your prompt and context) and output tokens (the reply), each per million tokens. One call costs (input ÷ 1,000,000 × input price) + (output ÷ 1,000,000 × output price). Multiply by calls per day and by thirty for a monthly figure, the calculator does this for you.
Why are output tokens more expensive than input?
Output is generated one token at a time, while input is read in parallel, so generation needs more compute. Output is usually billed at several times the input rate, which is why the length of the answer often moves your bill more than the prompt.
What is the cheapest LLM API?
It changes constantly as prices fall. Budget tiers (names like flash, mini, lite, or efficiency-focused labs) sit at a small fraction of flagship prices. Because output cost usually dominates, sort the live table by output price for your workload. See cheapest LLM API.
Is a subscription or the API cheaper?
For everyday chat, a flat ~$20/month subscription is often cheaper than the API up to a few million tokens per month. For production or high-volume automation, pay-as-you-go API is almost always cheaper. Find your break-even on the subscriptions vs API page.
What is prompt caching?
Caching lets a provider store and reuse a repeated part of your input (a fixed system prompt or document) at a steep discount, often up to ~90% off the cached input. Great for chatbots, RAG, and agents with long static instructions.
What is the Batch API?
A batch API processes requests asynchronously (submit a job, collect later, commonly within 24h) at a discount that is often around half the standard rate. Ideal for nightly jobs, dataset enrichment, and bulk generation.
How can I reduce my LLM API costs?
The biggest levers: control output length, route easy tasks to a cheaper model, cache repeated context, batch non-urgent work, and trim input. Doing several of these can cut a bill 50–80%. Full guide: how to cut your LLM API costs, or see AI agent costs if you run agents.
How many tokens is 1,000 words?
Roughly 1,300–1,500 tokens, since one token is about ¾ of a word. Code uses more tokens per line than prose. Estimate any text with the token counter.
What is a context window?
The maximum number of tokens a model can consider at once, including input and output. A large window helps with long documents, but it only costs more if you actually fill it on every call.
Are there free LLM APIs?
Yes, several providers offer a rate-limited free tier good for prototyping, and aggregators expose free-to-use models. Filter the main table by the "Free" capability to see what's currently free.
Is GPT cheaper than Claude or Gemini?
It depends on the tier, not the brand. Each family has cheap and premium models, and the gap between tiers usually beats the gap between brands at the same tier. Compare the specific models for your token mix. See GPT vs Claude vs Gemini.
General guidance for 2026; exact prices and limits change frequently, confirm on each provider's official page and use the live TokenSwarm calculator. Not affiliated with any provider.