Meta-llama

Llama 3.1 8B Instruct API Pricing 2026

Compare pricing, benchmarks, and providers for Llama 3.1 8B Instruct. Find the best value for your use case.

8 Ways to Use Fewer Tokens
Last updated: November 21, 2026 at 08:43 AM

Overview

Llama 3.1 8B Instruct was released on July 23, 2024. Pricing starts at $0.020 per million input tokens and $0.040 per million output tokens. The model supports a context window of up to 16K tokens. API access is available through Meta-llama.

Context Window
16K
tokens
Pricing
Input$0.020
Output$0.040
Cached$0.0075
per 1M tokens
Speed
Output-
TTFT-
median latency
Capabilities
ToolsCaching

Llama 3.1 8B Instruct is priced at $0.020 per million input tokens and $0.040 per million output tokens. It has a context window of 16,384 tokens. It is available from 10 providers, with DeepInfra the cheapest at $0.020 per million input tokens (input prices range from $0.020 to $0.220). On benchmarks, Llama 3.1 8B Instruct scores Intelligence 23.8 (34th percentile), MMLU Pro 31.1 (43rd percentile), GPQA 8.7 (25th percentile), Aider 37.6 (15th percentile).

Pricing Comparison

Compare Llama 3.1 8B Instruct with 10 similar models by price.

Current Pricing (per 1M tokens)

11 models

Sponsored The Grid | Spot Priced LLM API
The Grid | Spot Priced LLM API — Why pay list price when providers will bid for your API usage? Up to 80% off.
View spot prices
Provider
Model
Input $/M
Output $/M
Coding
MMLU
GPQA
Context
Actions
$0.020
$0.040
—
31.1
8.7
16,384
Try
$0.010
$0.020
—
—
—
32,768
Try
$0.010
$0.030
—
—
—
262,144
Try
$0.010
$0.000
—
—
—
-
Try
$0.014
$0.029
—
—
—
1,048,576
Try
$0.014
$0.028
—
—
—
163,840
Try
$0.017
$0.022
—
26.4
8.7
131,072
Try
IB
IBM
$0.017
$0.110
—
—
—
131,000
Try
$0.017
$0.085
—
—
—
131,072
Try
$0.020
$0.100
—
39.9
16.0
32,768
Try
$0.020
$0.020
—
7.6
3.4
60,000
Try

* Some models use tiered pricing based on prompt length. Displayed prices are for prompts ≤ 200k tokens.

Compare Providers

Llama 3.1 8B Instruct is available from multiple providers with different pricing and availability.

10
Providers
$0.020
Cheapest Input/M
$0.040
Cheapest Output/M
DeepInfra
Best Price

Provider Pricing

10 models

Sponsored The Grid | Spot Priced LLM API
The Grid | Spot Priced LLM API — Why pay list price when providers will bid for your API usage? Up to 80% off.
View spot prices
Provider
Input $/M
Output $/M
Cache Read $/M
Cache Write $/M
Uptime
DeepInfra
DeepInfra
Best Price
$0.020
$0.040
-
-
100.0%
OpenRouter
OpenRouter
Best Price
$0.020
$0.040
-
-
-
$0.050
$0.080
$0.025
-
100.0%
$0.050
$0.080
$0.007
-
-
$0.060
$0.060
-
-
-
A
Avian
$0.100
$0.100
-
-
-
$0.180
$0.180
-
-
-
$0.200
$0.200
$0.100
-
-
$0.220
$0.220
-
-
100.0%
C
CoreWeave
$0.220
$0.220
$0.220
-
100.0%
Provider pricing data sourced from OpenRouter and Helicone

Community Rankings

How does Llama 3.1 8B Instruct perform? Vote based on your experience.

Cost vs. Quality

Compare Llama 3.1 8B Instruct's benchmark performance against all models.

X-axis:
Y-axis:
Loading chart...
Llama 3.1 8B Instruct
Other models

Detailed Benchmark Scores

Intelligence
23.8 (34th pct)
Coding
-
Math
-
MMLU Pro
31.1 (43rd pct)
GPQA
8.7 (25th pct)
LiveCodeBench
-
AIME
-
Aider
37.6 (15th pct)
Benchmark data from Artificial Analysis and HuggingFace Open LLM Leaderboard

Try Llama 3.1 8B Instruct

Use our Calculator

Estimate your costs based on expected token usage.

Open Cost Calculator

Try in Playground

Test Llama 3.1 8B Instruct directly in your browser.

Open Playground

Frequently Asked Questions

Llama 3.1 8B Instruct costs $0.000020 per 1,000 input tokens and $0.000040 per 1,000 output tokens.
Llama 3.1 8B Instruct is available from 10 providers. DeepInfra offers the best price.
DeepInfra offers Llama 3.1 8B Instruct at $0.020 per million input tokens, the lowest of 10 providers (input prices range from $0.020 to $0.220 per million tokens).
Llama 3.1 8B Instruct scores Intelligence 23.8 (34th percentile), MMLU Pro 31.1 (43rd percentile), GPQA 8.7 (25th percentile), Aider 37.6 (15th percentile). Only benchmarks with published data for this model are shown.
We compare Llama 3.1 8B Instruct with 10 similarly-priced models. See the benchmark scatter plot above to compare quality vs cost.

All Meta-llama Models

See pricing for all Meta-llama models.

View all Meta-llama models →