Request
This endpoint expects an object.
modelstringRequired
The chat model to use for generating completions.
promptstring or list of stringsRequired
frequency_penaltydoubleOptional
A value between -2.0 and 2.0, with positive values increasingly penalizing new tokens based on their frequency so far in order to decrease further occurrences.
logit_biasobjectOptional
Modifies the likelihood of specified tokens appearing in a response.
max_tokensintegerOptional
The maximum number of tokens in the generated completion.
presence_penaltydoubleOptional
A value between -2.0 and 2.0, with positive values causing a flat reduction of new tokens based on their existing presence so far in order to decrease further occurrences.
stopstring or list of stringsOptional
streambooleanOptional
Whether to stream back the model response.
stream_optionsobjectOptional
Extra parameters used when streaming the response.
temperaturedoubleOptional
The temperature parameter for controlling randomness in completions. Supports a range of 0.0-2.0.
top_pdoubleOptional
The diversity of the generated text based on nucleus sampling. Supports a range of 0.0-1.0.
top_kintegerOptional
The diversity of the generated text based on top-k sampling.
outputobjectOptional
Options to affect the output of the response.
inputobjectOptional
Options to affect the input of the request.
Response
Successful response.
idstring
Unique ID for the completion.
objectstring
Type of object (completion).
createdinteger
Timestamp of when the completion was created.
modelstring
The model used for generating the result.
choiceslist of objects
The set of result choices.