Completions

POST
Retrieve text completions based on the provided input.

Request

This endpoint expects an object.
modelstringRequired
The chat model to use for generating completions.
promptstringRequired
The prompt to use for generating completions.
max_tokensintegerOptional
The maximum number of tokens in the generated completion.
temperaturedoubleOptional
The temperature parameter for controlling randomness in completions.
top_pdoubleOptional
The diversity of the generated text based on nucleus sampling.
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

This endpoint returns an object.
idstringOptional
Unique ID for the chat completion.
objectstringOptional
Type of object (chat completion).
createdintegerOptional
Timestamp of when the chat completion was created.
choiceslist of objectsOptional
The set of result choices.

Errors