stream=false is set in the request.
Request Headers
string
required
The API key to use for the request.
string
required
The content type of the request. Should be
application/json.Request Body
array
required
An array of messages of the conversation so far.
string
required
The model to use for the UI completion. Should be one of the models listed in the Models page.
number
The temperature to use for the UI completion. Should be between 0 and 1.
number
The top-p value to use for the UI completion. Should be between 0 and 1.
integer
The maximum number of tokens to use for the UI completion.
integer
The number of completions to generate.
integer
Should be unset or set to 1.
boolean
Whether to stream the response. Should be unset or
false.The parameters above are commonly used with the Messages API. For a
comprehensive list of all supported parameters and their compatibility across
different model providers (OpenAI vs Anthropic), see the Supported API
Parameters table.
Response
string
A unique identifier for the UI completion
array
An array of completions. Will always contain exactly one object.
string
The timestamp when the UI completion was created
string
The model used to generate the UI completion
string
The object type, which is always
chat.completionobject
An object containing the usage statistics for the UI completion