Skip to main content
POST
Generate chat completion

Body

application/json
messages
object[]
required
model
string
required

can be of the form {project}/{model} or {project}. In the latter it will use the default model

stop
string[] | null
max_tokens
integer<int32> | null
Required range: x >= 0
temperature
number<float> | null
top_p
number<float> | null
max_ttft_ms
integer<int64> | null
Required range: x >= 0
stream
boolean
stream_options
null | object
session_id
string<uuid> | null
user
string<uuid> | null
ab_campaign
null | string

id or key of the entity

Example:

"76d1fab3-214c-47ef-bb04-16270639bf89"

n
integer<int32>
Required range: x >= 0
labels
null | object

dictionnary with key and values as string

Example:
metadata
null | object

alias for labels

Example:
system_prompt_args
object | null

Will be used to render system prompt template

tags
string[] | null
use_tools
boolean
tools
object[] | null

Override tool configuration for this request - enables/disables specific tools

store
boolean | null

Response

a stream will be returned if streaming = true in the request

id
string
required
created
number
required

Unix Timestamp in seconds

Example:

"1720712536"

choices
object[]
required
session_id
string<uuid>
required
usage
object
required