Seedance 2.0 | Special Offer ✦ 10% OFF NOW
meta
meta-llama/llama-3.1-8b-instruct

meta-llama/llama-3.1-8b-instruct

16,384 context · $0.02/M input tokens · $0.05/M output tokens

Meta's latest class of model (Llama 3.1) launched with a variety of sizes & flavors. This 8B instruct-tuned version is fast and efficient. It has demonstrated strong performance compared to...

Pricing

Pay-per-use

No upfront costs, pay only for what you use

Input$0.02 / M Tokens
Output$0.05 / M Tokens

API Usage

Use the following code examples to integrate with our API:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://llm.wavespeed.ai/v1"
)

response = client.chat.completions.create(
    model="meta-llama/llama-3.1-8b-instruct",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

Model Introduction

Meta-Llama llama-3.1-8b-instruct

Meta's latest class of model (Llama 3

Meta's latest class of model (Llama 3.1) launched with a variety of sizes & flavors. This 8B instruct-tuned version is fast and efficient.

It has demonstrated strong performance compared to leading closed-source models in human evaluations.

To read more about the model release, click here. Usage of this model is subject to Meta's Acceptable Use Policy.


Why It Looks Great

  • Large Language Model architecture for efficient processing
  • 16384 context window for long document handling
  • Competitive pricing at $0.0/$0.0 per million tokens

Key Features

  • Context Window: 16384 tokens
  • Max Output: 16384 tokens
  • Vision: Supported
  • Function Calling: Supported

Specifications

SpecificationValue
ProviderMeta-Llama
Model TypeLarge Language Model (LLM)
ArchitectureN/A
Context Window16384 tokens
Max Output16384 tokens
InputText
OutputText
VisionSupported
Function CallingSupported

Pricing

Token TypeCost per Million Tokens
Input$0.0
Output$0.0

How to Use

  1. Write your prompt — describe the task, provide context, and specify desired output format.
  2. Submit — the model processes your request and returns the response.

API Integration

Base URL: https://llm.wavespeed.ai/v1 API Endpoint: chat/completions Model ID: meta-llama/llama-3.1-8b-instruct


API Usage

Python SDK

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://llm.wavespeed.ai/v1"
)

response = client.chat.completions.create(
    model="meta-llama/llama-3.1-8b-instruct",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)

print(response.choices[0].message.content)

cURL

curl https://llm.wavespeed.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "meta-llama/llama-3.1-8b-instruct",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Notes

  • Model: meta-llama/llama-3.1-8b-instruct
  • Provider: Meta-Llama

Info

Providermeta
Typellm

Supported Functionality

Input
Text
Output
Text
Context16,384
Max Output16,384
Vision-
Function Calling✓ Supported

API Access Guide

Base URLhttps://llm.wavespeed.ai/v1
API Endpointchat/completions
Model IDmeta-llama/llama-3.1-8b-instruct

Llama 3.1 8b Instruct API

meta-llama/llama-3.1-8b-instruct

Meta's latest class of model (Llama 3.1) launched with a variety of sizes & flavors. This 8B instruct-tuned version is fast and efficient. It has demonstrated strong performance compared to...

Input

$0.02 /M

Output

$0.05 /M

Context

16K

Max Output

16K

Tool Use

Supported

Try Llama 3.1 8b Instruct on WaveSpeedAI

Access Llama 3.1 8b Instruct through our unified API — OpenAI-compatible, no cold starts, transparent pricing.

Open Playground

Frequently Asked Questions about Llama 3.1 8b Instruct

How much does Llama 3.1 8b Instruct cost via the API?+

Pricing on WaveSpeedAI: $0.02 per million input tokens and $0.05 per million output tokens. Prompt caching and batch processing are billed separately and reduce effective cost on long, repetitive workloads.

What is the context window of Llama 3.1 8b Instruct?+

Llama 3.1 8b Instruct supports up to 16K tokens of context with up to 16K tokens of output per request.

Is Llama 3.1 8b Instruct OpenAI-compatible?+

Yes. WaveSpeedAI exposes Llama 3.1 8b Instruct through an OpenAI-compatible endpoint at https://llm.wavespeed.ai/v1. Point the official OpenAI SDK at this base URL with your WaveSpeedAI API key — no other code changes required.

How do I get started with Llama 3.1 8b Instruct?+

Sign in to WaveSpeedAI, create an API key in Access Keys, then send a request to https://llm.wavespeed.ai/v1/chat/completions with model id set to the value shown above. New accounts receive free credits to evaluate Llama 3.1 8b Instruct before paying per token.

Related LLM APIs