The complete guide
How LLM API pricing works
Updated November 18, 2026 · Published by Danny Rathod, Founder, StackLift AI. Written with AI assistance; how we make content.
Short answer
LLM APIs charge per token: one rate for the text you send in, a higher rate for the text the model writes back, and sometimes extra for reasoning, with discounts for cached input and batch jobs. Your monthly bill is tokens per request times requests per month times those rates. The live prices are in the table above.
How does LLM API pricing work?
Providers meter usage in tokens, small pieces of text. Prices are quoted per million tokens, with one rate for input and another for output. The prices shown above on this page are list prices that refresh through the day, so this guide explains how to use them rather than repeat them.
| Part | What it is | What to watch |
|---|---|---|
| Input tokens | Everything you send: instructions, history, documents, the question. | Long prompts and pasted documents add up on every call. |
| Output tokens | What the model writes back. | Usually priced higher than input, so long answers cost more. |
| Context window | The most text a model can read in one request. | A bigger window lets you send more, but you pay for what you send. |
| Cached input | Repeated prompt content the provider has stored. | Priced lower than fresh input when the same prefix repeats. |
| Batch processing | Jobs submitted for later, not instant, results. | Often discounted, and only fits work that can wait. |
| Reasoning tokens | Hidden thinking some models do before answering. | Billed like output, and easy to miss in an estimate. |
Rules differ by provider and change over time. Always confirm discounts and limits on the provider's own pricing page before you commit to a budget.
How do you estimate a monthly LLM bill?
Work from your real workload, not from a guess at tokens. A rough estimate built on honest inputs beats a precise one built on wishes.
- Pick one task, such as answering a support question or summarizing a document.
- Take a sample of real requests and count the input tokens per request, including instructions and any retrieved text.
- Count the output tokens of typical answers, and add room for reasoning if the model thinks before replying.
- Multiply by the number of requests per month, with a low, expected and high case.
- Apply input and output rates from the table above for each candidate model.
- Reduce the input share that repeats (cached) and the share that can run as a batch.
- Add retries, failed calls and test traffic, then keep a margin for growth.
The explorer above does the arithmetic when you enter your monthly token use. If you are budgeting an agent, which makes several calls per task, see the AI agent costs page, and for a full build plus running cost use the free estimate.
How do you choose a model for a workload?
Choose by the task, then check the price. Test two or three models on your own examples and compare quality, speed and cost per finished task. A model that costs more per token but needs fewer retries can cost less overall.
| Workload | What matters most | Model type to try first |
|---|---|---|
| Classification, tagging, routing | Speed and low cost at volume | A small, fast model |
| Extraction from documents | Accuracy on your formats | A small or mid-size model, tested on real files |
| Customer support replies | Tone, grounding in your content, safety | A mid-size model with retrieval |
| Multi-step agents | Reliable tool use and planning | A larger model, with cheaper ones for simple steps |
| Code, analysis, long reasoning | Reasoning quality | A larger or reasoning model |
| Long documents | Context window and recall | A model with a large window, or retrieval to shorten the input |
| Sensitive data | Where the data is processed | A model or hosting option that fits your data rules |
Many products use more than one model: a small one for routine steps and a larger one for the hard ones. That pattern is called model routing. Provider-specific pages with live prices are linked from the explorer above for the major models.
What are the ways to pay less for LLM APIs?
Cost cuts that keep quality come from sending less, reusing more and picking the smaller model where it is enough.
| Lever | How it saves | Trade-off |
|---|---|---|
| Shorter prompts | Fewer input tokens on every call. | Needs careful editing and re-testing. |
| Prompt caching | Repeated prefixes cost less. | Only helps when the start of the prompt stays the same. |
| Batch processing | Discounted rates for jobs that can wait. | Results are not instant. |
| Model routing | Easy tasks go to cheaper models. | Needs a router and evaluation of each path. |
| Retrieval instead of long context | Send only the relevant passages. | Needs a good retrieval setup. |
| Output limits | Caps long or runaway answers. | Can cut answers short if set too low. |
| Response reuse | Store answers to repeated questions. | Needs rules for when an answer goes stale. |
The LLM cost optimization playbook puts these in order, and the glossary entry on AI cost optimization defines them.
What does an LLM price list not include?
List prices cover model usage only. A working product has other costs, and they often outweigh the tokens at low volume.
- Build work: prompts, retrieval, evaluation and integration with your systems.
- Hosting, storage and a vector database if you use retrieval.
- Monitoring, logging and the tools to review quality over time.
- Guardrails, security review and handling of sensitive data.
- Self-hosting an open model: you swap token fees for GPU servers and the people to run them.
- Fine-tuning or training, which are priced separately.
For the build side, see LLM integration and its cost guide. If your data cannot leave your own environment, read about private LLM development.
How should you read the price tables on this page?
Prices are list prices in US dollars from a public source, so your provider's own prices, discounts and taxes may differ. Use the tables to compare models against each other and to set a budget range. Do not treat a single price as a promise.
A cheaper token rate does not mean a cheaper product. Compare the cost to finish a task at your quality bar, and re-check when providers change prices or release new models. A short monthly review of usage against budget catches drift early.
StackLift tracks model prices so the free estimate can recommend models for your use case and show the monthly running cost next to the build cost. Every estimate is reviewed by a senior architect before it becomes a commitment.
Questions people ask
What is a token in an LLM API?
A token is a small piece of text, often part of a word. Providers count tokens for what you send and what the model returns, and charge per million tokens. Read more in the tokens glossary entry.
Why is output more expensive than input?
Generating text takes more computation than reading it, so most providers price output tokens higher than input tokens. The exact gap differs by model, so check the table above.
What are reasoning tokens?
Some models think before they answer. That hidden thinking is usually billed like output even though you do not see it, so allow for it when you estimate a bill.
What does prompt caching do?
It stores a repeated start of your prompt, such as fixed instructions, so later calls read it at a lower rate. See prompt caching.
Is a bigger context window worth paying for?
Only if you need it. You pay for every token you send, so a big window used carelessly raises cost. Retrieval often reaches the same goal with less input. Read about the context window.
Which model should I use?
Test two or three on your own examples and compare cost per finished task, not price per token. Many products use a small model for routine steps and a larger one for hard ones.
Can I use these prices as a quote?
No. They are list prices for planning. Your provider's pricing page and your contract set the real rates.