Llama 3.1 8B Instruct

by Meta · Released · Announcement · All Meta releases

Llama 3.1 8B Instruct is Meta's production-grade lightweight model, released July 2024. With 8 billion parameters and a 131,072-token context window, it offers a strong cost-to-capability ratio, with solid instruction following and reasoning in a compact footprint. The model supports tool calling and structured output, enabling agentic workflows and programmatic integration without moving to larger models. It handles general-purpose tasks including summarization, question answering, code generation, and classification with competitive quality for its size. Its open-weight design and multilingual training make it suitable for fine-tuning and on-premise deployment. It is a common pick where compute is limited yet enough capability remains for diverse downstream tasks beyond simple text generation.

Sign up without a credit card · OpenAI SDK compatible
Input
$0.02 / 1M
Output
$0.05 / 1M
Cache read
$0.0030 / 1M
Context
131K tokens
Max output
131K tokens
Routes
2 EU · US

Available routes

Llama 3.1 8B Instruct runs on 2 different routes through the Opper gateway.

ProviderRegionZero data retentionTrainingInputOutputCache read
USNo$0.02$0.05Input price
EUNo$0.02$0.05$0.0030

Compare residency, zero data retention and training posture at a glance, with full data-handling detail per route below. In the EU it is served by FlexAI. See every Llama model hosted in the EU.

Live routes and prices as JSON: api.opper.ai/v3/models?q=meta-llama-3.1-8b-instruct

Key info

Input
Output
Features
Context window
131K
Max output
131K
Input price
$0.02 /1M
Output price
$0.05 /1M
Released
Web search
  • EU residency available on FlexAI
  • US residency available on DeepInfra
  • Zero data retention on pay-as-you-go
  • No training by default

Uptime and availability

One of Llama 3.1 8B Instruct's 2 routes is on the monitoring board, so the figure below is that provider's availability rather than the model's.

99.75%route uptime, last 30 days
Its other routes aren't measured here yet.

Name a second model in the same request and the gateway tries it on retriable errors, so a busy hour never has to reach your users. Set up a fallback chain.

Measured over the last 30 days from each provider's official status feed via StatusGator. Refreshed hourly. 1 further route is not on the board yet. See uptime for every provider Opper monitors.

Data handling per route

Each route hosting Llama 3.1 8B Instruct has its own privacy posture, residency, and GDPR terms. Postures are maintained by Opper with a last-verification timestamp.

DeepInfra — United States🇺🇸

Zero data retention: nothing is logged, held for abuse monitoring or used for training. No training on customer data. US; SCCs.

Zero data retention
Yes. Nothing is logged, held for abuse monitoring or used for training.
Training
No training on customer data.
Logging
None
Abuse monitoring
No classifier
Transfer mechanism
SCCs

FlexAI — EU🇪🇺

Zero data retention: nothing is logged, held for abuse monitoring or used for training. No training on customer data. EU.

Zero data retention
Yes. Nothing is logged, held for abuse monitoring or used for training.
Training
No training on customer data.
Logging
None
Abuse monitoring
No classifier
Caching
Content cached for replay
Subprocessor access
No subprocessor reads content
Transfer mechanism
Not applicable — data stays in EU

Best for

Where Llama 3.1 8B Instruct ranks among the models on Opper with a score for each use case.

Benchmarks

Independent benchmark scores: the Intelligence Index and the individual evaluations behind it, grouped by skill.

Global rank#393 of 521 LLMs
TierEfficient
Output speed143 tok/s
Intelligence Index (previous version)6.9
Coding
LiveCodeBench
12%
Agentic & knowledge work
GDPval
0%
Terminal-Bench Hard
1%
τ²-Bench Telecom
16%
Science & reasoning
Humanity's Last Exam
5%
GPQA Diamond
26%
Long-context reasoning
18%
Knowledge
MMLU-Pro
48%
Math & instruction following
AIME 2025
4%
IFBench
29%

Get started

Call Llama 3.1 8B Instruct through the Opper gateway with one API key. Opper is drop-in compatible with the OpenAI, Anthropic and Google AI SDKs.

Llama 3.1 8B Instruct is a premium model on Opper. Sign up needs no credit card: you get an API key straight away and the free models work in the playground and the API. Add a card to use premium models, pay-as-you-go with no minimum.

Set it up with your agent

Copy this and paste it into a coding agent like Claude Code, Cursor or Codex and it'll wire up Opper for you.

Or call it directly

import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.OPPER_API_KEY,
baseURL: "https://api.opper.ai/v3/compat",
});
const completion = await client.chat.completions.create({
model: "meta-llama-3.1-8b-instruct",
messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Use Llama 3.1 8B Instruct in your apps

Pick your tool, then choose Llama 3.1 8B Instruct to see how to run it through Opper.

Use Llama 3.1 8B Instruct with tools

The tools Llama 3.1 8B Instruct can use through Opper. Pick one to see how to set it up.

Compare Llama 3.1 8B Instruct with…

Side-by-side on privacy, EU hosting, pricing, and benchmarks.

Other models from Meta

Start building with 700+ models

One API key for every major provider, up and running in minutes.

Get startedView Documentation