Chat-Format

POST /v1/chat/completions für Bibliotheken, die das Chat-Completions-Format sprechen.

Endpunkt
POST https://api.flixtake.app/v1/chat/completions

Viele Bibliotheken und Werkzeuge sprechen das Chat-Completions-Format. Damit sie ohne Umbau mit FTI-3 arbeiten, nimmt die API es ebenfalls an. Trag dort https://api.flixtake.app/v1 als Adresse und deinen Schlüssel ein.

curl https://api.flixtake.app/v1/chat/completions \
  -H "Authorization: Bearer $FLIXTAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fti-3-sofort",
    "max_tokens": 300,
    "messages": [
      {"role": "system", "content": "Antworte in einem Satz."},
      {"role": "user", "content": "Was macht eine Script Supervisorin?"}
    ]
  }'

Felder

FeldBedeutung
modelfti-3-sofort, fti-3-mittel oder fti-3-hoch
messagesRollen system, user, assistant; content als Text
max_tokensHöchstens 8.192
streamtrue liefert chat.completion.chunk-Ereignisse und zum Schluss data: [DONE]
temperature, top_p, stopWie gewohnt, temperature und top_p nur bei FTI-3 Sofort

Was hier fehlt

Das Chat-Format kennt hier kein Denken, keine Werkzeuge und keine Bilder als Eingabe. Wenn du das brauchst, nimm POST /v1/responses. Fehler kommen in dieser Kompatibilitätsschicht im gewohnten Format mit error.type.

Antwort
{
  "id": "chatcmpl-2d78…",
  "object": "chat.completion",
  "model": "fti-3-sofort",
  "choices": [
    { "index": 0, "message": { "role": "assistant", "content": "Sie hält fest, was gedreht wurde …" }, "finish_reason": "stop" }
  ],
  "usage": { "prompt_tokens": 24, "completion_tokens": 31, "total_tokens": 55 }
}