Calculators / LLM API cost
LLM API Cost Calculator (2026)
At 10,000 requests a month with 1,500 input and 500 output tokens, DeepInfra's Llama 3.1 8B costs $0.50 and Groq's costs $1.15. Change the request volume, token mix or model below to see your own monthly bill using list prices read on November 20, 2026.
Start from a typical workload
Illustrative starting points, not benchmarks. Replace them with your own request and token counts when you have logs.
Total tokens per request: 2,000
At 10,000 requests per month, DeepInfra costs $0.50 for Llama 3.1 8B (128k context), which is $0.65 less than Groq.
DeepInfra
Meta-Llama-3.1-8B-Instruct-Turbo
$0.02/M input ยท $0.04/M output
$0.50
per month, list price
- Input
- $0.30
- Output
- $0.20
Groq
Llama 3.1 8B Instant 128k
$0.05/M input ยท $0.08/M output
$1.15
per month, list price
- Input
- $0.75
- Output
- $0.40
Your workload is 20.0M tokens/month โ less than 0.1% of the 84.4B tokens/month where an H100 PCIe would cost the same as this API bill. Check the break-even.
List prices read from the vendors' official pricing pages on November 20, 2026. Excludes tax, cache discounts, minimum commitments and negotiated enterprise rates. Verify on the official page before you commit.
How do you calculate a monthly LLM API bill?
Token prices are quoted per one million tokens, so the estimate has three inputs: requests per month, average input tokens per request and average output tokens per request. Input tokens include the system prompt, conversation history you resend and retrieved context. Output tokens are what the model generates.
Monthly cost = (requests ร input tokens รท 1,000,000 ร input rate) + (requests ร output tokens รท 1,000,000 ร output rate). Nothing else is added, because neither vendor charges a platform fee or minimum commitment at the volumes this page targets.
The comparison only includes models that both vendors list. Llama 3.1 8B and Llama 3.3 70B qualify; GPT-OSS, Kimi and Qwen appear on Groq but not on DeepInfra's public price list, so putting them in the same table would compare different models rather than different prices.
What does one million tokens cost on Groq and DeepInfra?
For Llama 3.1 8B, Groq charges $0.05 per million input tokens and $0.08 per million output tokens; DeepInfra charges $0.02 and $0.04. Both vendors list the same two Llama models, so the rates below are directly comparable. Groq is faster per token; DeepInfra is cheaper on both input and output. The last column is the monthly bill at 10,000 requests with 1,500 input and 500 output tokens.
| Model | Provider | Input / 1M | Output / 1M | 10k-request bill |
|---|---|---|---|---|
| Llama 3.1 8B | Groq | $0.05 | $0.08 | $1.15 |
| Llama 3.1 8B | DeepInfra | $0.02 | $0.04 | $0.50 |
| Llama 3.3 70B | Groq | $0.59 | $0.79 | $12.80 |
| Llama 3.3 70B | DeepInfra | $0.10 | $0.32 | $3.10 |
Rates read from the official pricing pages on November 20, 2026 and billed per million tokens; neither vendor charges a platform fee at these volumes.
What do other Groq and DeepInfra models cost?
Groq's other listed models range from GPT OSS 20B at $0.075 input / $0.30 output per million tokens up to Kimi K2 at $1.00 / $3.00 and Qwen 3.6 27B at $0.60 / $3.00. DeepInfra's Gemma family runs from $0.05 / $0.10 for Gemma 3 4B to $0.20 / $0.40 for Gemma 4 31B. These are single-provider rates, not like-for-like comparisons across vendors.
| Provider | Model | Input / 1M | Output / 1M |
|---|---|---|---|
| Groq | GPT OSS 20B | $0.075 | $0.30 |
| Groq | GPT OSS 120B | $0.15 | $0.60 |
| Groq | Kimi K2 | $1.00 | $3.00 |
| Groq | Qwen 3.6 27B | $0.60 | $3.00 |
| DeepInfra | Gemma 3 4B | $0.05 | $0.10 |
| DeepInfra | Gemma 3 27B | $0.08 | $0.16 |
| DeepInfra | Gemma 4 31B | $0.20 | $0.40 |
Rates read from the official Groq and DeepInfra pricing pages on November 20, 2026. The calculator above stays on the two Llama models both vendors list so the comparison holds the model constant.
What changes the real LLM API bill?
Four things move the number more than the headline rate. Retries and failed requests are billed when they consume tokens. Long conversations resend history, which raises input tokens per request. Output-heavy workloads are dominated by the output rate, where the two vendors differ most. Rate limits can force a more expensive fallback provider even when the primary vendor is cheaper on paper.
If your workload is latency-sensitive, price is not the deciding factor. Groq's advantage is speed; DeepInfra's is cost per token. Run a small sample of real traffic through both before you move a production workload.
Related pages
- Groq pricing and limits โ the full tool profile behind these rates.
- DeepInfra pricing and limits โ model list, per-token rates and caveats.
- GPU rental cost calculator โ compare self-hosting against API prices.
- GPU vs API break-even โ the token volume where a rented card starts to win.
- Cheapest LLM APIs for coding in 2026 โ the wider provider comparison.
Frequently Asked Questions
How much does Kimi K2 cost on Groq?
Groq lists Kimi K2 at $1.00 per million input tokens and $3.00 per million output tokens. At 10,000 requests with 1,500 input and 500 output tokens, that is $15.00 for input plus $15.00 for output, or $30.00 per month.
How much does Gemma 3 4B cost on DeepInfra?
DeepInfra lists Gemma 3 4B at $0.05 per million input tokens and $0.10 per million output tokens. At 10,000 requests with 1,500 input and 500 output tokens, that is $0.75 for input plus $0.50 for output, or $1.25 per month.
What does one million tokens cost on Groq and DeepInfra?
Llama 3.1 8B: Groq $0.05 input and $0.08 output per million tokens, DeepInfra $0.02 and $0.04. Llama 3.3 70B: Groq $0.59 and $0.79, DeepInfra $0.10 and $0.32. A blended cost depends on the input-to-output ratio, which the calculator applies to your own token counts.
How much does Llama 3.1 8B cost per million tokens?
Groq charges $0.05 per million input tokens and $0.08 per million output tokens. DeepInfra charges $0.02 input and $0.04 output for the same model. At 10,000 requests with 1,500 input and 500 output tokens, that is $1.15 on Groq and $0.50 on DeepInfra.
How is the monthly LLM API cost calculated?
Multiply requests by average input tokens, divide by one million, then multiply by the input price per million tokens. Do the same for output tokens and add both sides. A 10,000-request month with 1,500 input and 500 output tokens uses 15M input and 5M output tokens.
Why compare Groq and DeepInfra on the same model?
Different model sizes make a price table meaningless. Both vendors publish Llama 3.1 8B and Llama 3.3 70B, so the calculator holds the model constant and shows only the price difference. Quality, latency and rate limits still differ and are not priced here.
Does the calculator include cached tokens or batch discounts?
No. It uses standard on-demand list prices. Prompt caching and batch APIs can cut real bills, but the discount varies by model and vendor, so including an assumed cache hit rate would produce a number that looks precise but is not.
Will my real bill match this estimate?
Only if your request count and average token counts are accurate and the vendor has not changed prices. The estimate excludes tax, minimum commitments, retries and failed requests. Use it to choose a direction, then confirm the exact rate on the vendor's pricing page.
Prices are read from the official Groq and DeepInfra pricing pages (data as of November 20, 2026). DevGems is not affiliated with either vendor and does not earn a commission from this calculator. Rates can change without notice; confirm on the vendor page before you commit.
