Create a chat completion
Generate a chat completion from one of the available models. Mixlayer’s API is OpenAI-compatible, so existing OpenAI client libraries work without modification — see Client Libraries for examples.
Set stream to true to receive JSON chunks as server-sent events; the stream ends with data: [DONE].
Authentication
Request
Message objects in turn order. Each message has a role and content.
Maximum tokens to generate. Takes precedence over max_tokens.
Legacy alias for max_completion_tokens.
Developer-supplied metadata stored with the response when store is true.
Reasoning effort: none, minimal, low, medium, high, xhigh, or max.
Multiplicative penalty on tokens already in the context. 1.0 applies no penalty.
Best-effort deterministic sampling seed.
If true, stream the response as Server-Sent Events. Defaults to false.
Controls randomness. Lower values make output more deterministic; higher values make it more diverse.
Legacy boolean reasoning switch accepted as thinking or reasoning.
Only consider the top-k most likely tokens at each step.
Response
A complete response or a stream of completion chunks, selected by the request’s stream field
Object type, always chat.completion.