TensaHub › LLM7

LLM7 · codestral-latest

API des Modells codestral-latest bei LLM7, $0.01 / $0.02 pro Million Tokens, Kontext 32.000 Tokens. Beispiele in curl, Python und JavaScript, Live-Test.

Im Katalog testen und bewerten

Typ
Modell
Anbieter
LLM7
Modell-ID
codestral-latest
Preis
Kostenpflichtig
Preis Eingabe / Ausgabe
$0.01 / $0.02 pro Million Tokens
Zugang ohne Schlüssel
Nein
Schlüsselvariable
LLM7_API_KEY
Basis-URL (OpenAI-kompatibel)
https://api.llm7.io/v1
Kontext
32.000 Tokens
Eingaben
Text
Entwicklerbewertung
Noch nicht bewertet
Dokumentation
https://llm7.io

Codebeispiele

cURL

curl https://api.llm7.io/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LLM7_API_KEY" \
  -d '{"model":"codestral-latest","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://api.llm7.io/v1", api_key=os.environ["LLM7_API_KEY"])
r = client.chat.completions.create(
    model="codestral-latest",
    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://api.llm7.io/v1', apiKey: process.env.LLM7_API_KEY })
const r = await client.chat.completions.create({
  model: 'codestral-latest',
  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 LLM7 · codestral-latest kostenlos?

Nein: LLM7 · codestral-latest ist eine kostenpflichtige API ($0.01 / $0.02 pro Million Tokens).

Wie rufe ich LLM7 · codestral-latest aus meinem Code auf?

LLM7 · codestral-latest bietet eine OpenAI-kompatible API unter https://api.llm7.io/v1: Verwenden Sie ein beliebiges OpenAI-SDK (Python, JavaScript …) mit dieser Basis-URL. Modellkennung: codestral-latest. Fertiger Code (Streaming, JSON, Wiederholungen) steht im Werkzeugkasten für Entwickler bereit.

Wie groß ist das Kontextfenster von LLM7 · codestral-latest?

LLM7 · codestral-latest verarbeitet bis zu 32.000 Tokens Kontext (Nachricht und Verlauf).