Create a chat completion
Generate a model response for the given conversation. Set stream: true
to receive the response incrementally as Server-Sent Events (SSE).
Authorizations
Your Infyrence API key, sent as Authorization: Bearer sk-....
Body
The model to use. Any id returned by GET /v1/models.
"claude-sonnet-5"
"gpt-5.5"
"gemini-3.1-pro"
The conversation so far, as a list of messages.
1Sampling temperature. Higher is more random.
0 <= x <= 2Nucleus sampling probability mass.
0 <= x <= 1Maximum number of tokens to generate in the completion.
x >= 1If true, stream the response as Server-Sent Events.
Up to a few sequences where generation stops.
Penalize new tokens by their existing frequency in the text so far.
-2 <= x <= 2Penalize new tokens by whether they already appear in the text so far.
-2 <= x <= 2Number of completions to generate.
x >= 1Best-effort deterministic sampling seed.
Response
The chat completion. When stream is false (default), the body is a
single ChatCompletionResponse JSON object. When stream is true,
the body is a text/event-stream of ChatCompletionChunk objects ,
each sent as a data: {...} line, terminated by a final data: [DONE].