Meta: Llama-3.1-8B-Instruct
Llama-3.1-8B-Instruct is a language model from Meta released on Jul 23, 2024. It reads text and writes text, with a 8K token context window and up to 4K tokens per reply.
Show moreShow less
It costs $0.02 per million input tokens and $0.04 per million output tokens.
It supports tool calling and structured JSON output, and its weights are open, so you can host it yourself.
15 providers serve it, including Deep Infra, Hugging Face and Novita AI.
- Modalities
- In / out price
- $0.02 / $0.04 per 1M
- Context
- 8K
- Max output
- 4K
- Released
- Jul 23, 2024
- Knowledge cutoff
- Dec 2023
- Tool calling
- Structured output
- Reasoning
- Prompt caching
- Open weights
- Free to use
Llama-3.1-8B-Instruct pricing
USD, as listed on Nov 29, 2026. Most bills are input heavy, so the cached input rate matters as much as the headline price.
| Input | $0.02 / 1M tokens | |
|---|---|---|
| Output | $0.04 / 1M tokens |
Llama-3.1-8B-Instruct providers
15 providers serve it, including Deep Infra, Hugging Face and Novita AI. Each host sets its own price and limits, so the cheapest one is not always the one with the longest context.
| Provider | Input /M | Output /M | Cache read /M | Context | Max output |
|---|---|---|---|---|---|
| Deep Infra | $0.02 | $0.04 | n/a | 131K | 4K |
| Hugging Face | $0.02 | $0.04 | n/a | 131K | 4K |
| Novita AI | $0.02 | $0.05 | n/a | 16K | 16K |
| Databricks | $0.15 | $0.45 | n/a | 128K | 8K |
| Vercel AI Gateway | $0.22 | $0.22 | n/a | 128K | 8K |
| Eden AI | $0.02 | $0.05 | n/a | 131K | 4K |
| Helicone | $0.02 | $0.05 | n/a | 16K | 16K |
| Kilo Gateway | $0.02 | $0.04 | n/a | 131K | 118K |
| NanoGPT | $0.02 | $0.04 | $0.01 | 131K | 16K |
| Kitani | $0.049 | $0.0765 | $0.0245 | 8K | 4K |
| Poe | $0.10 | $0.10 | n/a | 128K | n/a |
| ZeroGPU | $0.15 | $0.28 | n/a | 131K | 8K |
Showing 12 of 15 providers: the lab first, then the major clouds, then the cheapest resellers.
What Llama-3.1-8B-Instruct costs per month
Pick a workload close to yours or type your own volumes.
Supported request parameters
What you can set when you call Llama-3.1-8B-Instruct through an OpenAI compatible API.
- Tools
tools - Structured outputs
structured_outputs - Temperature
temperature
Alternatives to Llama-3.1-8B-Instruct
Models that take the same inputs and call tools, closest in price, cheaper ones first.
- 262K context
Reads text. Tool calling, structured output, reasoning. Served by 3 providers.
by inclusionaiAug 7, 2026$0.015/M input tokens$0.045/M output tokens3 providers
- 131K context
Reads text. Tool calling, structured output. Served by 2 providers.
by meta-llamaSep 25, 2024$0.02/M input tokens$0.02/M output tokens2 providers
- 524K context
Reads text. Tool calling, structured output, reasoning. Served by 2 providers.
by upstageNov 24, 2026$0.01/M input tokens$0.04/M output tokens2 providers
- 8K context
Reads text. Tool calling, structured output. Served by 10 providers.
by mistralaiJul 18, 2024$0.029/M input tokens$0.03/M output tokens10 providers
- 16K context
Reads text and images. Tool calling. Served by 2 providers.
by lightonaiJan 16, 2026$0.0238/M input tokens$0.0714/M output tokens2 providers
- 262K context
Reads text, images and video. Tool calling, structured output, reasoning. Served by 2 providers.
by qwenMar 2, 2026$0.02/M input tokens$0.10/M output tokens2 providers
More from Meta
- 164K context
Reads text and images. Served by 4 providers.
by meta-llamaApr 29, 2025$0.18/M input tokens$0.18/M output tokens4 providers
- 512 context
Reads text. Served by 3 providers.
by meta-llamaApr 29, 2025$0.03/M input tokens$0.03/M output tokens3 providers
- 512 context
Reads text. Served by 3 providers.
by meta-llamaApr 29, 2025$0.04/M input tokens$0.04/M output tokens3 providers
- Index 10
Reads text and images. Tool calling, structured output. Served by 6 providers.
by meta-llamaApr 5, 2025128K context$0.35/M input tokens$1/M output tokens6 providers
- 131K context
Reads text and images. Tool calling, structured output. Served by 5 providers.
by meta-llamaApr 5, 2025$0.25/M input tokens$1/M output tokens5 providers
- Index 8.1
Reads text and images. Tool calling, structured output. Served by 4 providers.
by meta-llamaApr 5, 2025328K context$0.10/M input tokens$0.30/M output tokens4 providers
Llama-3.1-8B-Instruct questions
How much does the Llama-3.1-8B-Instruct API cost?
$0.02 per million input tokens and $0.04 per million output tokens. The estimator on this page turns that into a monthly bill for your own workload.
What is the context window of Llama-3.1-8B-Instruct?
8,192 tokens of input, and it can write up to 4,096 tokens in one reply. As a rough guide, a million tokens is around 750,000 English words.
Which providers serve Llama-3.1-8B-Instruct?
15 providers serve it, including Deep Infra, Hugging Face and Novita AI. Prices differ by host, so the Providers table on this page lists each one with its input and output price.
Does Llama-3.1-8B-Instruct support tool calling?
Yes. It accepts tool definitions and can return JSON that matches a schema, which is what an agent needs to call your APIs.
Is Llama-3.1-8B-Instruct open source?
Its weights are published, so you can run it on your own hardware or a cloud of your choice. Read the license before commercial use.
When was Llama-3.1-8B-Instruct released?
Jul 23, 2024, with training data up to Dec 2023.
Catalog data from models.dev (MIT licensed), refreshed daily, last on Nov 29, 2026. The summary is written from these facts.