Completions

POST
Retrieve text completions based on the provided input.

Request

This endpoint expects an object.
model
stringRequired
The chat model to use for generating completions.
prompt
stringRequired
The prompt to use for generating completions.
max_tokens
integerOptional
The maximum number of tokens in the generated completion.
temperature
doubleOptional
The temperature parameter for controlling randomness in completions.
top_p
doubleOptional
The diversity of the generated text based on nucleus sampling.
top_k
integerOptional
The diversity of the generated text based on top-k sampling.
output
objectOptional
Options to affect the output of the response.
input
objectOptional
Options to affect the input of the request.

Response

This endpoint returns an object
id
stringOptional
Unique ID for the chat completion.
object
stringOptional
Type of object (chat completion).
created
integerOptional
Timestamp of when the chat completion was created.
choices
list of objectsOptional
The set of result choices.

Errors