Models / Chat / Llama 3.1 8B API
Llama 3.1 8B API
LLM
Multilingual LLM pre-trained and instruction-tuned, surpassing open and closed models on key benchmarks.
Try our Llama 3.1 API

API Usage
How to use Llama 3.1 8BModel CardPrompting Llama 3.1 8BApplications & Use CasesHow to use Llama 3.1 8BLlama 3.1 8B API Usage
Endpoint
meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo
RUN INFERENCE
curl -X POST "https://api.together.xyz/v1/chat/completions" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
"messages": [
{
"role": "user",
"content": "What are some fun things to do in New York?"
}
]
}'
JSON RESPONSE
RUN INFERENCE
from together import Together
client = Together()
response = client.chat.completions.create(
model="meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
messages=[
{
"role": "user",
"content": "What are some fun things to do in New York?"
}
]
)
print(response.choices[0].message.content)
JSON RESPONSE
RUN INFERENCE
import Together from "together-ai";
const together = new Together();
const response = await together.chat.completions.create({
messages: [
{
role: "user",
content: "What are some fun things to do in New York?"
}
],
model: "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo"
});
console.log(response.choices[0].message.content)
JSON RESPONSE
Model Provider:
Meta
Type:
Chat
Variant:
Instruct
Parameters:
8B
Deployment:
✔ Serverless
✔️ On-Demand Dedicated
Quantization
FP8
Context length:
131K
Pricing:
$0.18
Check pricing
Run in playground
Deploy model
Quickstart docs
Quickstart docs
How to use Llama 3.1 8B
Model details
Prompting Llama 3.1 8B
Applications & Use Cases
How to use Llama 3.1 8B
Looking for production scale? Deploy on a dedicated endpoint
Deploy Llama 3.1 8B on a dedicated endpoint with custom hardware configuration, as many instances as you need, and auto-scaling.
