Skip to main content
POST
Create completion

Authorizations

Authorization
string
header
default:default
required

Body

application/json
prompt
string
required

A string providing context for the model to complete.

Example:

"<s>[INST] What is the capital of France? [/INST]"

model
string
required

The name of the model to query.

Example:

"mistralai/Mixtral-8x7B-Instruct-v0.1"

max_tokens
integer

The maximum number of tokens to generate.

stop
string[]

A list of string sequences that will truncate (stop) inference text output.

temperature
number<float>

Determines the degree of randomness in the response.

top_p
number<float>

The top_p (nucleus) parameter is used to dynamically adjust the number of choices for each predicted token based on the cumulative probabilities.

top_k
integer<int32>

The top_k parameter is used to limit the number of choices for the next predicted word or token.

repetition_penalty
number<float>

A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition.

stream
boolean

If set, tokens are returned as Server-Sent Events as they are made available. Stream terminates with data: [DONE]

logprobs
integer

Determines the number of most likely tokens to return at each token position log probabilities to return

Required range: 0 <= x <= 1
echo
boolean

If set, the response will contain the prompt, and will also return prompt logprobs if set with logprobs.

n
integer

Number of generations to return

Required range: 1 <= x <= 128
safety_model
string

The name of the safety model to use.

Example:

"safety_model_name"

min_p
number<float>

The min_p parameter is a number between 0 and 1 and an alternative to temperature.

presence_penalty
number<float>

The presence_penalty parameter is a number between -2.0 and 2.0 where a positive value will increase the likelihood of a model talking about new topics.

frequency_penalty
number<float>

The frequency_penalty parameter is a number between -2.0 and 2.0 where a positive value will decrease the likelihood of repeating tokens that were mentioned prior.

logit_bias
object

The logit_bias parameter allows us to adjust the likelihood of specific tokens appearing in the generated output.

Example:

Response

200

id
string
required
choices
object[]
required
usage
object | null
required
created
integer
required
model
string
required
object
enum<string>
required
Available options:
text_completion
prompt
object[]