TensaHub › OpenRouter

Meta: Llama 3.1 70B Instruct

API des Modells meta-llama/llama-3.1-70b-instruct bei OpenRouter, $0.72 / $0.72 pro Million Tokens, Kontext 131.072 Tokens. Beispiele in curl, Python und JavaScript, Live-Test.

Im Katalog testen und bewerten

Meta's latest class of model (Llama 3.1) launched with a variety of sizes & flavors. This 70B instruct-tuned version is optimized for high quality dialogue usecases. It has demonstrated strong...

Typ
Modell
Anbieter
OpenRouter
Modell-ID
meta-llama/llama-3.1-70b-instruct
Preis
Kostenpflichtig
Preis Eingabe / Ausgabe
$0.72 / $0.72 pro Million Tokens
Zugang ohne Schlüssel
Nein
Schlüsselvariable
OPENROUTER_API_KEY
Basis-URL (OpenAI-kompatibel)
https://openrouter.ai/api/v1
Kontext
131.072 Tokens
Eingaben
Text
Funktionen
Tool-Aufrufe
Entwicklerbewertung
Noch nicht bewertet
Dokumentation
https://openrouter.ai/meta-llama/llama-3.1-70b-instruct

Codebeispiele

cURL

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -d '{"model":"meta-llama/llama-3.1-70b-instruct","messages":[{"role":"user","content":"Hallo, stell dich in einem Satz vor."}]}'

Python

# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
r = client.chat.completions.create(
    model="meta-llama/llama-3.1-70b-instruct",
    messages=[{"role": "user", "content": "Hallo, stell dich in einem Satz vor."}],
)
print(r.choices[0].message.content)

JavaScript

// npm install openai
import OpenAI from 'openai'

const client = new OpenAI({ baseURL: 'https://openrouter.ai/api/v1', apiKey: process.env.OPENROUTER_API_KEY })
const r = await client.chat.completions.create({
  model: 'meta-llama/llama-3.1-70b-instruct',
  messages: [{ role: 'user', content: 'Hallo, stell dich in einem Satz vor.' }],
})
console.log(r.choices[0].message.content)

Integrationscode erzeugen →

Beliebte Suchen

Häufige Fragen

Ist die API von Meta: Llama 3.1 70B Instruct kostenlos?

Nein: Meta: Llama 3.1 70B Instruct ist eine kostenpflichtige API ($0.72 / $0.72 pro Million Tokens).

Wie rufe ich Meta: Llama 3.1 70B Instruct aus meinem Code auf?

Meta: Llama 3.1 70B Instruct bietet eine OpenAI-kompatible API unter https://openrouter.ai/api/v1: Verwenden Sie ein beliebiges OpenAI-SDK (Python, JavaScript …) mit dieser Basis-URL. Modellkennung: meta-llama/llama-3.1-70b-instruct. Fertiger Code (Streaming, JSON, Wiederholungen) steht im Werkzeugkasten für Entwickler bereit.

Wie groß ist das Kontextfenster von Meta: Llama 3.1 70B Instruct?

Meta: Llama 3.1 70B Instruct verarbeitet bis zu 131.072 Tokens Kontext (Nachricht und Verlauf).

Welche Alternativen gibt es zu Meta: Llama 3.1 70B Instruct?

Ähnliche APIs im Katalog: Llama-3.2-3B-Instruct · Parasail, Llama-3.1-8B-Instruct · Amazon Bedrock, Llama-3.1-8B-Instruct · CoreWeave, Llama-3.1-8B-Instruct · DeepInfra, Llama-3.1-8B-Instruct · Groq.

Alternativen