Openai Chat Completions

OpenAI-compatible chat completions endpoint.

Translates OpenAI SDK format to native format, calls core logic, translates back.

Request

This endpoint expects an object.
modelstringRequired
messageslist of objectsRequired
temperaturedouble or nullOptional
top_pdouble or nullOptional
ninteger or nullOptional
streambooleanOptionalDefaults to false
stopstring or list of strings or nullOptional
max_tokensinteger or nullOptional
max_completion_tokensinteger or nullOptional
presence_penaltydouble or nullOptional
frequency_penaltydouble or nullOptional
logit_biasmap from strings to doubles or nullOptional
userstring or nullOptional
toolslist of objects or nullOptional
tool_choicestring or map from strings to any or nullOptional
response_formatobject or nullOptional
OpenAI response format.
seedinteger or nullOptional
stream_optionsmap from strings to any or nullOptional

Response

Successful Response

Errors