Completions
OpenAI-compatible API endpoints
Achtung
Our API does not support all parameters offered by OpenAI. Requests are still accepted and processed, but not all parameters are considered.
Supported parameters:
modelmessagesresponse_formatstreamtemperaturetoolstool_choice
post
https://app.meingpt.com/api/openai/v1/chat/completionsCreate a chat completion
Creates a model response for the given chat conversation. Compatible with OpenAI's chat completions API.
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
Request Body · application/json
| Feld | Typ | Beschreibung |
|---|---|---|
| messages* | Array<ChatMessage> | List of messages comprising the conversation so far |
| model* | string | ID of the model to use |
| response_format | object | |
| stream | boolean | Whether to stream back partial progress |
| temperature | number | Sampling temperature to use |
| tools | Array<object> | Tools (functions) the model may call. Not every model supports tool calling — a request with tools against an unsupported model (e.g. Perplexity) returns 400. |
| tool_choice | "auto" | "none" | "required" | object | Controls which tool is called — 'auto', 'none', 'required', or a specific function. |
Responses
200Successful response
| Feld | Typ | Beschreibung |
|---|---|---|
| id | string | Unique identifier for the chat completion |
| object | string | |
| created | number | Unix timestamp |
| model | string | The model used |
| choices | Array<object> | |
| usage | Usage |
400Bad request - invalid input
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
401Unauthorized - missing or invalid API key
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
403Forbidden - completions API not enabled for organization
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
500Internal server error
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
Was this page helpful?