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 reasoning_effort to default, none, minimal, low, medium, high, xhigh, or max, or omit it for the model default. Some models also support numeric reasoning effort. Check the model’s Mixlayer documentation page for supported values and ranges. Models reject unsupported efforts; see Reasoning for model-specific mappings and legacy boolean controls.
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: default, none, minimal, low, medium, high, xhigh, or max. Some models also support numeric reasoning effort. Check the model’s Mixlayer documentation page for supported values and ranges. Omit for the model default. See Reasoning for model-specific mappings and unsupported values.
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.
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.