Zum Hauptinhalt springen

Chat-Vervollständigungen

Basis-URL: https://app.neuroflash.com/api/ds-prototypes

Generiere Textvervollständigungen mit KI-Modellen

Chat-Vervollständigungen

POST/chat/completions

Verarbeite Chat-Vervollständigungen mit Token-Verfolgung und Provider-Routing

Anfrage-Body

FeldTypErforderlichBeschreibung
messagesarray<object>JaListe von Nachrichten mit 'role' und 'content'
modelstringJaName des Modells
temperatureobjectNeinTemperatur des Modells
max_tokensobjectNeinBegrenzen Sie die Anzahl der zu generierenden Token
reasoningobjectNeinParameter für den Reasoning-Modus
reasoning_effortobjectNeinStufe des Reasoning-Modus
toolsobjectNeinFür Tools & Funktionsaufrufe
tool_choiceobjectNeinBeeinflussen Sie die Tool-Auswahl
seedobjectNeinZufälliger Seed
response_formatobjectNeinWird für strukturierte Ausgaben verwendet, um ein JSON-Schema zu definieren
web_search_optionsobjectNeinZusätzliche Optionen für WEB Search
structured_outputsobjectNeinSchema, das die strukturierte Ausgabe beschreibt, die das Modell produzieren soll
frequency_penaltyobjectNeinBestrafungsoption
presence_penaltyobjectNeinBestrafungsoption
repetition_penaltyobjectNeinBestrafungsoption
stopobjectNeinStoppbedingung anpassen
streamobjectNeinStreaming-Modus aktivieren

Beispiel

curl -X POST "https://app.neuroflash.com/api/ds-prototypes/chat/completions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "x-workspace-id: YOUR_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"messages": [],
"model": "string",
"temperature": {},
"max_tokens": {},
"reasoning": {},
"reasoning_effort": {},
"tools": {},
"tool_choice": {},
"seed": {},
"response_format": {},
"web_search_options": {},
"structured_outputs": {},
"frequency_penalty": {},
"presence_penalty": {},
"repetition_penalty": {},
"stop": {},
"stream": {}
}'

Antwort:

{}

Systemzustandsprüfung

GET/health

Health-Check-Endpunkt

Beispiel

curl "https://app.neuroflash.com/api/ds-prototypes/health" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "x-workspace-id: YOUR_WORKSPACE_ID"

Antwort:

{}