Create Chat Completion

post

Generates a model response for the given chat conversation.

Authorizations
AuthorizationstringRequired

Bearer token authentication. Use format "Bearer your-api-key"

Body
modelstringRequired

ID of the model to use.

Example: dmind/dmind-1
streamboolean · nullableOptional

If set, partial message deltas will be sent.

Default: false
max_tokensinteger · min: 1 · nullableOptional

The maximum number of tokens to generate in the chat completion.

Example: 16384
temperaturenumber · max: 2 · nullableOptional

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Default: 1Example: 0.6
top_pnumber · max: 1 · nullableOptional

An alternative to sampling with temperature, called nucleus sampling. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

Default: 1Example: 0.95
top_kinteger · min: -1 · nullableOptional

Limits the number of tokens to consider for each step. Use -1 for no limit.

Default: -1Example: -1
min_pnumber · max: 1 · nullableOptional

Minimum probability threshold for token sampling. Tokens with probability below this threshold are filtered out.

Default: 0Example: 0.1
frequency_penaltynumber · min: -2 · max: 2 · nullableOptional

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

Default: 0Example: 0
presence_penaltynumber · min: -2 · max: 2 · nullableOptional

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

Default: 0Example: 0
stopone of · nullableOptional

Up to 4 sequences where the API will stop generating further tokens.

stringOptional
or
string[]Optional
tool_choiceone of · nullableOptional

Controls which (if any) tool is called by the model.

string · enumOptionalPossible values:
or
logprobsboolean · nullableOptional

Whether to return log probabilities of the output tokens.

Default: false
top_logprobsinteger · max: 20 · nullableOptional

How many log probabilities to return per token.

Responses
post
/v1/chat/completions

Last updated