POST
/
conduit
/
v1
/
completions

Body

messages
message[]

The messages to send to the model. Each message is a JSON object with the fields “role” (being either ‘user’ or ‘assistant’) and ‘content’.

max_tokens
int

The maximum number of tokens to generate. Defaults to 256 tokens.

top_k
int

The top k tokens to sample from. Defaults to 50 tokens.

top_p
float

The top p sampling parameter. Defaults to 0.9.

temperature
float

The temperature sampling parameter, 0 being greedy sampling. Defaults to 1.0.

presence_penalty
float

The presence penalty parameter. Defaults to 1.0.

frequency_penalty
float

The frequency penalty parameter. Defaults to 1.0.

stream
boolean

Whether to stream the response or not. Defaults to false.

model
string

The id of the model to use for inference.

Response

id
string

The id of the completion.

object
string

The type of the completion. Always “text_completion”.

created
int

The unix timestamp of the completion.

choices
choice[]

The completion choices. Each choice is a JSON object with the fields “text”, “index” and “logprobs”.