input
string | [...]
Non-empty completion text or a chat message array.
>
[...]
{...}
A message in conversation order.
>
role
string
Message role: system, user, or assistant.
content
string
Message text or assistant answer prefill; optional with assistant reasoning.
reasoning_content
string | null
Assistant reasoning history or prefill; reasoning-only prefill requires thinking.
max_tokens
number
Positive maximum output tokens. Defaults to 512 and includes thinking tokens.
stream
boolean
Stream choices as events ending with [DONE]. Defaults to false.
thinking
boolean
Enable chat reasoning; it counts toward max_tokens. Defaults to false.
stop
string | [...]
Stop at a matching non-empty string.
>
[...]
string
Stop string.
temperature
number
Sampling randomness. Must be non-negative; zero selects greedy decoding.
top_p
number
Cumulative probability cutoff from 0 to 1.
top_k
number
Non-negative maximum candidate count; 0 disables filtering.
min_p
number
Relative probability threshold from 0 to 1; 0 disables filtering.
seed
number | null
Non-negative safe integer seed; null or omission uses a random seed.
repetition_penalty
number
Positive penalty for repeated tokens.
repeat_last_n
number
History window; -1 uses all available history and 0 disables the window.
presence_penalty
number
Penalty for tokens already present.
frequency_penalty
number
Penalty based on token frequency.
logit_bias
{} | [...]
Token bias map or an array of token and bias pairs.
>
[...]
[...]
A token and its bias.
>
[0]
number | string
Token ID or text.
[1]
number | boolean
Bias value; false blocks the token.
grammar
string
Grammar constraint; thinking must be false. Do not combine with json_schema.
json_schema
{}
JSON schema constraint. Do not combine with grammar.
logprobs
number | null
Positive number of alternatives; null disables it.
dry
{...} | null
DRY repetition settings; null disables the overrides.
>
multiplier
number
Penalty strength. Defaults to 0, which disables DRY.
base
number
Penalty growth for longer repetitions.
allowed_length
number
Repeated sequence length allowed without penalty.
penalty_last_n
number
Previous tokens checked for repeated sequences.
sequence_breakers
[...]
Non-empty list of strings that break a repeated sequence.
>
[...]
string
Sequence breaker.
xtc
{...} | null
XTC sampling settings; null disables the overrides.
>
probability
number
Chance of applying XTC. Defaults to 0.
threshold
number
Minimum probability for token removal.
mirostat
{...} | null
An object enables Mirostat 2.0; null disables it. Do not combine with greedy decoding or active top-k, top-p, min-p, or XTC filters.
>
tau
number
Target entropy. Defaults to 5.0.
eta
number
Learning rate. Defaults to 0.1.