Meta Llama: Llama 3.1 8B Instruct
meta-llama/llama-3.1-8b-instruct
Access Llama 3.1 8B Instruct from Meta Llama using Puter.js AI API.
Get Started// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
puter.ai.chat("Explain quantum computing in simple terms", {
model: "meta-llama/llama-3.1-8b-instruct"
}).then(response => {
document.body.innerHTML = response.message.content;
});
<html>
<body>
<script src="https://js.puter.com/v2/"></script>
<script>
puter.ai.chat("Explain quantum computing in simple terms", {
model: "meta-llama/llama-3.1-8b-instruct"
}).then(response => {
document.body.innerHTML = response.message.content;
});
</script>
</body>
</html>
# pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://api.puter.com/puterai/openai/v1/",
api_key="YOUR_PUTER_AUTH_TOKEN",
)
response = client.chat.completions.create(
model="meta-llama/llama-3.1-8b-instruct",
messages=[
{"role": "user", "content": "Explain quantum computing in simple terms"}
],
)
print(response.choices[0].message.content)
curl https://api.puter.com/puterai/openai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_PUTER_AUTH_TOKEN" \
-d '{
"model": "meta-llama/llama-3.1-8b-instruct",
"messages": [
{"role": "user", "content": "Explain quantum computing in simple terms"}
]
}'
Model Card
Llama 3.1 8B Instruct is Meta's efficient 8 billion parameter multilingual model supporting 128K context and 8 languages. It's ideal for resource-constrained deployments requiring summarization, classification, and translation capabilities.
Context Window 131K
tokens
Max Output 131K
tokens
Input Cost $0.05
per million tokens
Output Cost $0.08
per million tokens
Release Date Jul 23, 2024
Model Playground
Try Llama 3.1 8B Instruct instantly in your browser.
This playground uses the Puter.js AI API — no API keys or setup required.
Benchmarks
How Llama 3.1 8B Instruct performs on standard evaluations.
| Benchmark | Score |
|---|---|
| GPQA Diamond Graduate-level science Q&A | 25.9% |
| Humanity's Last Exam Cross-domain reasoning | 5.3% |
| LiveCodeBench Recent coding problems | 11.6% |
| SciCode Scientific programming | 13.2% |
| MATH-500 Competition math | 51.9% |
| AIME 2024 Advanced math exam | 7.7% |
| AIME 2025 Advanced math exam | 4.3% |
| IFBench Instruction following | 28.6% |
| LCR Long-context reasoning | 18.0% |
| Terminal-Bench Hard Agentic terminal tasks | 0.8% |
| τ²-Bench Tool use / agents | 16.4% |
Scores sourced from Artificial Analysis.
Find other Meta Llama models →
Muse Spark 1.2
Muse Spark 1.2 is Meta Superintelligence Labs' coding-focused update to Muse Spark 1.1, released alongside Muse Code, a terminal coding agent it powers. Meta scaled up training compute on coding tasks and training-environment diversity, aiming at code generation, debugging, codebase understanding, and long-horizon work like whole-repository generation. On Meta's own evaluation harness, Muse Spark 1.2 scored 82.9% on Terminal-Bench 2.1 and 59.3% on DeepSWE 1.1, edging OpenAI's GPT-5.6 Terra (81.8%) and xAI's Grok 4.5 (81.6%) on Terminal-Bench but trailing Anthropic's Opus 5 (86.7%). These are vendor-run numbers, not yet independently verified on the public leaderboards. It keeps the 1,048,576-token context window and text, image, video, audio, and PDF input from 1.1, at the same $1.25 per million input and $4.25 per million output token pricing. A separate contributor tier offers lower rates in exchange for letting Meta train on your prompts and completions.
ChatMuse Spark 1.1
Muse Spark 1.1 is a multimodal reasoning model from Meta Superintelligence Labs, built for agentic workflows. It accepts text, images, video, audio, and PDF documents as input and returns text, with a 1,048,576-token context window. The model is designed to orchestrate multi-agent workflows, acting as either a main agent that plans and delegates tasks or as a subagent, and it generalizes zero-shot to new tools, MCP servers, and custom skills. It supports parallel function calling, structured output, built-in search with citations, and configurable reasoning effort, and Meta reports strong results on coding across large codebases, computer-use tasks, and visual-to-code generation. This is Meta's first model available through a paid API, priced at $1.25 per million input tokens and $4.25 per million output tokens, aimed at developers building agentic coding tools and enterprise workflow automation.
ChatLlama 4 Maverick
Llama 4 Maverick is Meta's 400 billion total parameter MoE model with 17B active parameters and 128 experts, supporting 1M token context. It's natively multimodal with state-of-the-art performance on coding, reasoning, and image understanding tasks.
Frequently Asked Questions
You can access Llama 3.1 8B Instruct by Meta Llama through Puter.js AI API. Include the library in your web app or Node.js project and start making calls with just a few lines of JavaScript — no backend and no configuration required. You can also use it with Python or cURL via Puter's OpenAI-compatible API.
Yes, it is free if you're using it through Puter.js. With the User-Pays Model, you can add Llama 3.1 8B Instruct to your app at no cost — your users pay for their own AI usage directly, making it completely free for you as a developer.
| Price per 1M tokens | |
|---|---|
| Input | $0.05 |
| Output | $0.08 |
Llama 3.1 8B Instruct was created by Meta Llama and released on Jul 23, 2024.
Llama 3.1 8B Instruct supports a context window of 131K tokens. For reference, that is roughly equivalent to 262 pages of text.
Llama 3.1 8B Instruct can generate up to 131K tokens in a single response.
Llama 3.1 8B Instruct scores 7.8 on the Artificial Analysis Intelligence Index, outperforming 25% of tracked models. On coding, it scores 5.4 (outperforms 5% of models). On math, it scores 4.3 (outperforms 7% of models).
Yes — the Llama 3.1 8B Instruct API works with any JavaScript framework, Node.js, or plain HTML through Puter.js. Just include the library and start building. See the documentation for more details.
Get started with Puter.js
Add Llama 3.1 8B Instruct to your app without worrying about API keys or setup.
Read the Docs View Tutorials