API Reference for the /v1/chat endpoint.
role
(user
or assistant
) and content
(the message text).false
. If set to true
, the response will be streamed back in chunks as it’s generated.1024
.0.2
) makes the output more deterministic, while a higher value (e.g., 0.8
) makes it more random. Defaults to 1
.1
.{ "type": "json_object" }
enables JSON mode, which guarantees the message the model generates is valid JSON.