TensaHub › GitHub Models

GitHub Models · openai/gpt-4.1-mini

API des Modells openai/gpt-4.1-mini bei GitHub Models, Preis beim Anbieter. Beispiele in curl, Python und JavaScript, Live-Test.

Im Katalog testen und bewerten

Free with limits, GitHub token.

Typ
Modell
Anbieter
GitHub Models
Modell-ID
openai/gpt-4.1-mini
Preis
Kostenlos + bezahlt
Zugang ohne Schlüssel
Nein
Schlüsselvariable
GITHUB_TOKEN
Basis-URL (OpenAI-kompatibel)
https://models.github.ai/inference
Eingaben
Text
Entwicklerbewertung
Noch nicht bewertet
Dokumentation
https://github.com/marketplace/models

Codebeispiele

cURL

curl https://models.github.ai/inference/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -d '{"model":"openai/gpt-4.1-mini","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://models.github.ai/inference", api_key=os.environ["GITHUB_TOKEN"])
r = client.chat.completions.create(
    model="openai/gpt-4.1-mini",
    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://models.github.ai/inference', apiKey: process.env.GITHUB_TOKEN })
const r = await client.chat.completions.create({
  model: 'openai/gpt-4.1-mini',
  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 GitHub Models · openai/gpt-4.1-mini kostenlos?

GitHub Models · openai/gpt-4.1-mini bietet ein begrenztes Gratiskontingent; darüber hinaus ist die Nutzung kostenpflichtig.

Wie rufe ich GitHub Models · openai/gpt-4.1-mini aus meinem Code auf?

GitHub Models · openai/gpt-4.1-mini bietet eine OpenAI-kompatible API unter https://models.github.ai/inference: Verwenden Sie ein beliebiges OpenAI-SDK (Python, JavaScript …) mit dieser Basis-URL. Modellkennung: openai/gpt-4.1-mini. Fertiger Code (Streaming, JSON, Wiederholungen) steht im Werkzeugkasten für Entwickler bereit.

Welche Alternativen gibt es zu GitHub Models · openai/gpt-4.1-mini?

Ähnliche APIs im Katalog: gpt-oss-20b · AkashML, gpt-oss-20b · Amazon Bedrock, gpt-oss-20b · CoreWeave, gpt-oss-20b · Groq, gpt-oss-20b · Parasail.

Alternativen