Skip to main content
POST
Create chat completion

Authorizations

Authorization
string
header
required

Security scheme that accepts Unikorn Identity JWTs.

Body

application/json; charset=utf-8
model
string
required
messages
(Message · object | ImageMessage · object)[]
required
stream
boolean
default:false
stream_options
StreamOptions · object
max_completion_tokens
integer<int32>
max_tokens
integer<int32>
n
integer<int32>
default:1
frequency_penalty
number<float>
default:0
logit_bias
object
logprobs
boolean
default:false
presence_penalty
number<float>
default:0
response_format
ResponseFormat · object
stop
any
temperature
number<float>
default:1
top_p
number<float>
default:1
top_logprobs
integer<int32>
tool_choice
any

Controls which (if any) tool is called by the model. Only 'auto' and 'none' are supported here. 'required' tool_choice option requires vllm>=0.8.3 and is not currently supported.

tools
any[]
seed
integer<int64>
reasoning_effort
string

Response

id
string
required
object
string
required
created
integer<int64>
required
model
string
required
choices
ChatCompletionChoice · object[]
required
usage
Usage · object
required
prompt_logprobs
string
system_fingerprint
string