Seedream 5.0 Pro ya está aquí | Pruébalo en el Generador de Imágenes →
meta
meta-llama/llama-3.1-8b-instruct

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

Fecha de lanzamiento: 2024-07-23

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...

Precios

Pago por uso

Sin costos iniciales, paga solo por lo que uses

Entrada$0.02 / M Tokens
Salida$0.05 / M Tokens

Probar el modelo

meta-llama/llama-3.1-8b-instruct
En línea
meta
¡Hola! Soy un asistente de IA útil. ¿En qué puedo ayudarte?
¿Listo para usar este modelo en un coding agent local?Configurar agent

Uso de API

Usa los siguientes ejemplos de código para integrar con nuestra API:

import OpenAI from 'openai';

if (!process.env.WAVESPEED_API_KEY) throw new Error('Set WAVESPEED_API_KEY');
const client = new OpenAI({
  apiKey: process.env.WAVESPEED_API_KEY,
  baseURL: 'https://llm.wavespeed.ai/v1',
  timeout: 120_000,
  maxRetries: 2,
});

try {
  const response = await client.chat.completions.create({
    model: 'meta-llama/llama-3.1-8b-instruct',
    messages: [{ role: 'user', content: 'Hello!' }],
  });
  console.log(response.choices[0]?.message?.content ?? '');
} catch (error) {
  console.error('LLM request failed:', error);
  process.exitCode = 1;
}

Introducción del modelo

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

Información

Proveedormeta
Tipollm

Funcionalidades compatibles

Entrada
Texto
Salida
Texto
Contexto16,384
Salida máxima16,384
Visión-
Function Calling✓ Compatible

Guía de acceso a la API

Base URLhttps://llm.wavespeed.ai/v1
API Endpointchat/completions
ID del modelometa-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...

Entrada

$0.02 /M

Salida

$0.05 /M

Contexto

16K

Salida máx.

16K

Uso de herramientas

Compatible

Prueba Llama 3.1 8b Instruct en WaveSpeedAI

Accede a Llama 3.1 8b Instruct mediante nuestra API unificada — compatible con OpenAI, sin arranques en frío, precios transparentes.

Preguntas frecuentes sobre Llama 3.1 8b Instruct

¿Cuánto cuesta Llama 3.1 8b Instruct a través de la API?+

Precios en WaveSpeedAI: $0.02 por millón de tokens de entrada y $0.05 por millón de tokens de salida. El prompt caching y el procesamiento por lotes se facturan por separado y reducen el coste efectivo en cargas largas y repetitivas.

¿Cuál es la ventana de contexto de Llama 3.1 8b Instruct?+

Llama 3.1 8b Instruct admite hasta 16K tokens de contexto y hasta 16K tokens de salida por solicitud.

¿Es Llama 3.1 8b Instruct compatible con OpenAI?+

WaveSpeedAI ofrece Llama 3.1 8b Instruct en https://llm.wavespeed.ai/v1 mediante la interfaz Chat Completions compatible con OpenAI. En la mayoría de clientes del SDK de OpenAI basta con cambiar la URL base y la clave API; los campos opcionales dependen del modelo.

¿Cómo empiezo con Llama 3.1 8b Instruct?+

Inicia sesión en WaveSpeedAI, crea una clave API en Access Keys y envía una solicitud a https://llm.wavespeed.ai/v1/chat/completions con el id de modelo mostrado arriba. Consulta el catálogo actual para conocer disponibilidad, capacidades y precios.

APIs LLM relacionadas

Llama 3.1 8B Instruct | Meta Lightweight LLM API | WaveSpeedAI