LLM API pricing per million tokens: how to estimate what a feature will cost
LLM API pricing per million tokens means you pay two rates: one for the tokens you send (input) and a higher one for the tokens the model generates (output). To estimate a feature's cost, multiply average input and output tokens per request by those rates and by monthly request volume. Across FastInfra's catalog the median paid chat model costs $0.2835 per million input tokens and $0.882 per million output tokens, and the cheapest paid route starts at $0.0179.
The two prices on every model
Every chat model on the pricing page shows an input price and an output price, both expressed in US dollars per million tokens. Input covers everything you send: system prompt, conversation history, retrieved documents, tool definitions. Output covers everything the model writes back, including tool call arguments. The two rates differ because generation is sequential and occupies the GPU far longer per token than reading a prompt does. Across the catalog the median paid output price is 3.1× the median input price.
Prices are per million tokens for readability, but the maths works per token: a $0.50 per million input rate is $0.0000005 per token. A request with 2,000 input tokens at that rate costs one tenth of a cent before any output is counted.
What a token is, and why the count varies by model
A token is a chunk of text from the model's vocabulary: roughly four characters of English, or about three-quarters of a word. Code, non-Latin scripts and long numbers tokenize less efficiently, so the same text can be 20–40% more tokens on one model than another. Because providers meter against their own tokenizer, the only reliable count is the usage block in the response: prompt_tokens and completion_tokens. Log both for a week of real traffic before you estimate anything.
The cost-per-request formula
With real averages in hand the estimate is arithmetic:
cost_per_request = (avg_input_tokens × input_price_per_M
+ avg_output_tokens × output_price_per_M) / 1,000,000
monthly_cost = cost_per_request × requests_per_month
Worked example for a support-reply drafting feature: a 900-token system prompt plus 1,100 tokens of ticket context is 2,000 input tokens; the draft averages 350 output tokens. On a model priced at $0.40 in and $1.20 out, the request costs (2,000 × 0.40 + 350 × 1.20) ÷ 1,000,000 = $0.00122. At 200,000 drafts per month that is about $244. Switching the same feature to a $2.00 / $8.00 model lifts it to roughly $1,360 a month for the identical traffic, which is why model choice is the first lever.
Live prices: the cheapest paid chat models right now
The table below is generated from the live catalog each time this page is served, so the figures are the current rates rather than the ones on the day the article was written.
| Model | Input $/1M | Output $/1M | Routes |
|---|---|---|---|
| Qwen/Qwen2-1.5B-Instruct | $0.021 | $0.021 | 2 |
| mistralai/mistral-nemo | $0.0305 | $0.0315 | 1 |
| mistralai/Mistral-Nemo-Instruct-2407 | $0.0305 | $0.0315 | 1 |
| meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo | $0.021 | $0.042 | 2 |
| inclusionai/ling-3.0-flash | $0.0221 | $0.0662 | 2 |
| Sao10K/L3-8B-Lunaris-v1-Turbo | $0.042 | $0.0525 | 1 |
| sao10k/l3-lunaris-8b | $0.042 | $0.0525 | 1 |
| openai/gpt-oss-20b | $0.0189 | $0.0945 | 4 |
| meta-llama/llama-3.2-1b-instruct | $0.063 | $0.063 | 2 |
| meta-llama/llama-3.2-3b-instruct | $0.063 | $0.063 | 2 |
Every model id in the table can be called through the same OpenAI-compatible endpoint; FastInfra routes each request to the lowest-priced healthy upstream for that id, so the quoted price is the ceiling you pay, not an estimate.
Why the output ratio matters more than the rate card
Two features with the same request volume can differ tenfold in cost purely because of how much the model writes. Classification returns a single label (a handful of output tokens); summarisation returns a paragraph; code generation returns hundreds of tokens. When you compare models, weight the output price by your feature's output share. A model that is cheaper on input but pricier on output can lose for a generation-heavy workload and win for retrieval-augmented question answering where prompts are long and answers short.
Three controls bound the output side: a sensible max_tokens (a hard cap), explicit length instructions in the prompt ("answer in two sentences"), and stop sequences for structured outputs so the model does not continue past the field you need.
Hidden costs to include
- Retries. A 2% retry rate on timeouts or validation failures is a 2% cost increase; retries after partial streams can double the cost of that request.
- Conversation history. Each turn re-sends the full history as input. A ten-turn chat sends the first message ten times; summarise or truncate history after a few turns.
- Tool definitions. JSON schemas for twenty tools can add 2,000+ input tokens to every call. Send only the tools relevant to the step.
- Evaluation traffic. Nightly eval runs are real tokens; budget them separately so they do not hide inside the product figure.
How FastInfra pricing works in practice
Credits are prepaid; usage is deducted after each successful response and shown per API key in the console so you can attribute spend to a product surface. There is no monthly minimum and no platform fee on top of the per-token rate. Free-tier models (12 of the 785 ids today) bill nothing and are the right default for prototypes and for fallback when a paid model returns 402. For sustained high-volume inference on one model, compare the per-token total against renting a GPU Cloud pod billed per minute; the break-even depends on utilisation, which the next guides in this cluster cover.
A repeatable estimation checklist
Run this once per feature and again whenever the prompt or model changes:
- Log
prompt_tokensandcompletion_tokensfrom theusageblock for at least a thousand real requests. - Take the mean and the 95th percentile of each; the mean drives the bill, the p95 drives your
max_tokensceiling. - Look up the candidate model ids in the model catalog and copy the input and output rates.
- Compute cost per request for each candidate and multiply by monthly volume; add 3–5% for retries and evaluation traffic.
- Run your evaluation set and divide monthly cost by the success rate to get cost per successful task; pick on that number.
- Set a balance alert in the console and revisit when the rate limit tier or traffic profile changes.
The checklist takes an hour the first time and minutes afterwards. Teams that skip step one and estimate tokens by eye are routinely wrong by a factor of two or three, usually because they forget conversation history and tool schemas. More estimation and cost-control guides are collected in the LLM pricing guides cluster.
Frequently asked questions
Why are output tokens more expensive than input tokens?
Generation is sequential: the model produces one token at a time and holds the GPU for the whole sequence, while a prompt is processed in parallel in a single pass. Providers price that extra GPU time into the output rate.
How many tokens is a typical request?
It varies by feature. A classification call may be 300 input and 5 output tokens; a RAG answer 3,000 input and 250 output; a code generation 1,500 input and 600 output. Measure your own usage block rather than assuming.
Does FastInfra charge anything besides the per-token price?
No. There is no monthly fee, platform fee or minimum. You buy prepaid credits, each successful response deducts input and output usage at the listed rates, and free-tier models deduct nothing.
Do prices change?
Yes. Upstream prices move and FastInfra syncs them automatically, which is why this page reads the live catalog instead of quoting fixed numbers. The pricing page always shows the current rate for every model id.
Is a cheaper model always the better choice?
Only if it meets your quality bar. Run your evaluation set against two or three candidates and compare cost per successful task, not cost per token; a cheaper model that needs retries can cost more.
Last reviewed October 16, 2026 by FastInfra. Prices and counts on this page are refreshed from the live catalog on every load.