Completions
OpenAI-kompatible API-Endpunkte
Unsere API unterstützt nicht alle Parameter, die OpenAI anbietet. Anfragen werden trotzdem akzeptiert und verarbeitet, jedoch werden nicht alle Parameter beachtet.
Unterstützte Parameter:
modelmessagesresponse_formatstreamtemperaturetoolstool_choice
/openai/v1/chat/completionsErstellt eine Modellantwort für die gegebene Chat-Konversation. Kompatibel mit OpenAIs Chat Completions API.
Authorization
ApiKeyAuth API-Schlüssel zur Authentifizierung. Verwende das Format 'Bearer <Dein-API-Schlüssel>'.
In: header
Header Parameters
API-Schlüssel zur Authentifizierung. Verwende das Format 'Bearer <Dein-API-Schlüssel>'.
Request Body
application/json
Liste der bisherigen Nachrichten der Konversation
ID des zu verwendenden Modells
Ob Teilergebnisse zurückgestreamt werden sollen
falseSampling-Temperatur
0 <= value <= 2Tools (Funktionen), die das Modell aufrufen darf. Nicht jedes Modell unterstützt Tool Calling – eine Anfrage mit Tools an ein nicht unterstütztes Modell (z. B. Perplexity) liefert 400.
Steuert, welches Tool aufgerufen wird – 'auto', 'none', 'required' oder eine bestimmte Funktion.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://app.meingpt.com/api/openai/v1/chat/completions" \ -H "Authorization: Bearer sk_meingpt_..." \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "role": "system", "content": "string" } ], "model": "string" }'{
"id": "string",
"object": "chat.completion",
"created": 0,
"model": "string",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "string",
"tool_calls": [
{
"id": "string",
"type": "function",
"function": {
"name": "string",
"arguments": "string"
}
}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}