POST
/
chat
/
completions

Request Body

messages
object

This parameter represents a collection of messages that form the ongoing conversation.

functions
object

This parameter contains a list of functions for which the model can generate JSON inputs.

stream
boolean

When this option is enabled, the model will send partial message updates, similar to ChatGPT. Tokens will be transmitted as data-only server-sent events as they become available, and the streaming will conclude with a data: [DONE] marker.

function_call
string

This parameter governs the model’s response to function calls. Choosing “none” indicates that the model will not invoke any functions and will respond directly to the end-user.

Response

choices
array