POST
/
api
/
v1
/
chat
/
completions
{
  "id": "<string>",
  "created": "1720712536",
  "choices": [
    {
      "index": 1,
      "message": {
        "role": "<string>",
        "content": "<string>"
      },
      "finish_reason": "<string>",
      "completion_id": "<string>",
      "model": "<string>"
    }
  ],
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "usage": {
    "completion_tokens": 1,
    "prompt_tokens": 1,
    "total_tokens": 1
  }
}

Body

application/json
messages
object[]
required
model
string
required

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

stop
string[] | null
max_tokens
integer | null
Required range: x >= 0
temperature
number | null
top_p
number | null
serialized_python
string | null
stream
boolean
stream_options
object
session_id
string | null
user
string | null
ab_campaign
string

id or key of the entity

Example:

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

n
integer
Required range: x >= 0
labels
object

dictionnary with key and values as string

Example:
{ "key": "value" }
metadata
object

dictionnary with key and values as string

Example:
{ "key": "value" }
system_prompt_args
object | null

Will be used to render system prompt template

tags
string[] | null

Response

200
application/json
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
required
usage
object
required