API pricing and cost
Llama3.1-8B-Instruct pricing
Llama3.1 8B Instruct official API pricing is $0.02 per million input tokens and $0.04 per million output tokens. Third-party provider prices are compared below.
Covers the 2024-07-23 Llama3.1-8B-Instruct release.
$0.02
Official input / 1M
Standard tier
$0.04
Official output / 1M
Standard tier
$0.024
Blended / 1M
4:1 input/output
$2.40
Example monthly cost
10K requests, 8K input + 2K output/request
Token charges only; tool calls, taxes, and other non-token fees are excluded.
Official API pricing
USD / 1M text tokens · Standard · Effective from 2026-11-13 · Last verified 2026-11-14
- InputStandard text tier, per million tokens
- $0.02
- OutputStandard text tier, per million tokens
- $0.04
API providers (2)
Published USD text API rates across hosting providers for Llama3.1-8B-Instruct. Compare listed rates, effective dates, and service-tier notes for the same model.
On the example assistant workload above (10K requests, 8K input + 2K output/request; missing cache rates billed at full input), DeepInfra lists the lowest flat-rate total at $2.40/month.
| Provider | Input / 1M | Cached / 1M | Output / 1M | Additional tiers & notes |
|---|---|---|---|---|
| DeepInfraEffective from 2026-11-13 | $0.02Lowest input | — | $0.04Lowest output | — |
| AmazonEffective from 2026-11-14 | $0.22 | — | $0.22 | Batch: $0.11/$0.11 per 1M tokens. |
What Llama3.1-8B-Instruct costs to run
Four workloads costed at official standard rates. Cached-input share is an estimation assumption, not a provider guarantee; when no cached rate is published, all input is billed at the uncached rate. Non-token fees are excluded.
| Workload | Per request | Monthly tokens | Input | Output | Per month |
|---|---|---|---|---|---|
| Chatbotshort turns | 1,500 in · 500 out× 100,000 requests | 150M in · 50M out | $3.00 | $2.00 | $5.00$0.00005 / request |
| Assistant8K context · 90% cached | 8,000 in · 2,000 out× 10,000 requests | 80M in · 20M out | $1.60 | $0.80 | $2.40$0.00024 / request |
| RAGlong input, cached · 50% cached | 24,000 in · 800 out× 20,000 requests | 480M in · 16M out | $9.60 | $0.64 | $10.24$0.000512 / request |
| Coding agentlong output · 70% cached | 15,000 in · 4,000 out× 20,000 requests | 300M in · 80M out | $6.00 | $3.20 | $9.20$0.00046 / request |
Monthly cost
$2.40
on Llama3.1-8B-Instruct
Per request
$0.00024
80M in · 20M out a month
Split
$1.60 + $0.80
input + output
The same workload costs $0.00 on Gemma 4 26B A4B, the cheapest of the comparable models below.
- Gemma 4 26B A4BGoogle Deep Mind · $0.00 / 1M blended$0.00
- Amazon Nova MicroAmazon · $0.056 / 1M blended$5.60
- Step 3.5 FlashStepFunAI · $0.082 / 1M blended$8.24
- Gemma 3 - 27B (IT)Google Deep Mind · $0.096 / 1M blended$9.60
- Llama-3.2-3BFacebook AI Research Lab · $0.15 / 1M blended$15.00
- Qwen2.5-72BAlibaba · $0.368 / 1M blended$36.80
Llama3.1-8B-Instruct against comparable models
Benchmark-overlap peers and price-comparable same-type models, costed on the assistant workload above. All figures use the same workload and caching rule; lower price does not imply equivalent capability or service terms.
| Model | Basis | Blended / 1M | Per month | vs Llama3.1-8B-Instruct |
|---|---|---|---|---|
| Gemma 4 26B A4BGoogle Deep Mind | Lower-cost option | $0.00 | $0.00 | 100%cheaper |
| Llama3.1-8B-InstructFacebook AI Research Lab · this model | This model | $0.024 | $2.40 | — |
| Amazon Nova MicroAmazon | Similar price | $0.056 | $5.60 | 133%dearer · 2.3× |
| Step 3.5 FlashStepFunAI | Similar price | $0.082 | $8.24 | 243%dearer · 3.4× |
| Gemma 3 - 27B (IT)Google Deep Mind | Shared benchmark coverage | $0.096 | $9.60 | 300%dearer · 4× |
| Llama-3.2-3BFacebook AI Research Lab | Shared benchmark coverage | $0.15 | $15.00 | 525%dearer · 6.3× |
| Qwen2.5-72BAlibaba | Shared benchmark coverage | $0.368 | $36.80 | 1,433%dearer · 15.3× |
Catalog price position: #7 cheapest of 252 active priced models in the LLMLearner catalog (cheaper than 98% at the 4:1 mix; official headline rates).
Llama3.1-8B-Instruct pricing questions
- How much does Llama3.1-8B-Instruct cost per million tokens?
- Llama3.1 8B Instruct official API pricing is $0.02 per million input tokens and $0.04 per million output tokens. At the default 4:1 input-to-output mix, that is $0.024 per million blended tokens.
- What does Llama3.1-8B-Instruct cost per month, and what is included?
- On the example Assistant workload (10,000 requests/month, 8,000 input and 2,000 output tokens/request), Llama3.1-8B-Instruct costs about $2.40/month ($0.00024/request). This includes token charges at the official rate only; tool calls, off-peak or batch tiers, and taxes are excluded.
- Is there a cheaper alternative to Llama3.1-8B-Instruct?
- Among the comparable models shown on this page, Gemma 4 26B A4B is cheaper at $0.00 per million blended tokens vs $0.024 for Llama3.1-8B-Instruct. Compare benchmarks before switching, as a lower rate does not guarantee equivalent quality or service terms. Across all 252 active priced models in the LLMLearner catalog, Llama3.1-8B-Instruct ranks 7th cheapest (cheaper than 98% at the default 4:1 mix).
- Does Llama3.1-8B-Instruct charge for cached input?
- Facebook AI Research Lab publishes no cached-input rate for Llama3.1-8B-Instruct here, so every input token is estimated at the full $0.02 per million.