Meta model
Llama 3.1 8B Instruct API cost calculator
Llama 3.1 8B Instruct costs $0.05 per 1M input tokens and $0.08 per 1M output tokens on the Meta API, with a 131K-token context window. A typical request (2K input, 500 output tokens) costs $0.0001 — about $4.20/month at 1,000 requests per day. Use the calculator below to model your exact workload.
Find me a cheaper modelWhat real workloads cost on Llama 3.1 8B Instruct
| Workload | Tokens (in / out) | Per request | Per 1K requests |
|---|---|---|---|
| Chatbot message | 500 / 300 | <$0.0001 | $0.05 |
| RAG query with context | 4,000 / 500 | $0.0002 | $0.24 |
| Document summarization | 20,000 / 1,000 | $0.0011 | $1.08 |
| Agent coding session | 100,000 / 5,000 | $0.0054 | $5.40 |
Llama 3.1 8B Instruct vs other Meta models
| Model | Input /1M | Output /1M | Context |
|---|---|---|---|
| Llama 3.1 8B Instruct | $0.05 | $0.08 | 131K |
| Llama Guard 4 12B | $0.18 | $0.18 | 164K |
| Llama 4 Maverick | $0.20 | $0.70 | 1.0M |
| Llama 4 Scout | $0.10 | $0.30 | 1.3M |
| Llama 3.3 70B Instruct | $0.10 | $0.32 |
Frequently asked questions
How much does Llama 3.1 8B Instruct cost per 1M tokens?
According to current pricing data, Llama 3.1 8B Instruct costs $0.05 per 1M input tokens and $0.08 per 1M output tokens. Processing 1M tokens each way costs $0.13.
What does a typical API request to Llama 3.1 8B Instruct cost?
A typical request with 2,000 input tokens and 500 output tokens costs $0.0001. At 1,000 requests per day that is $0.14 daily, or about $4.20 per month.
What is Llama 3.1 8B Instruct's context window?
Llama 3.1 8B Instruct supports a 131K-token context window (131,072 tokens).
Does Llama 3.1 8B Instruct support prompt caching?
Yes. Cached input tokens cost $0.02 per 1M — a 50% discount versus the standard input rate, which matters for agents and chat apps that resend the same system prompt.
What is a cheaper alternative to Llama 3.1 8B Instruct?
Granite 4.0 Micro from Ibm-granite is currently the cheapest comparable option at $0.02 per 1M input tokens versus $0.05 for Llama 3.1 8B Instruct — roughly 3x cheaper on input.
Compare all current prices on the live model pricing dashboard, see Llama 3.1 8B Instruct vs Granite 4.0 Micro pricing, or run Llama 3.1 8B Instruct head-to-head against other models in the side-by-side comparison playground.
Pricing data via the OpenRouter models API.