Skip to main content
POST
/
v1
/
ai
/
chat
Chat
curl --request POST \
  --url https://api.example.com/v1/ai/chat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "role": "<string>",
      "content": "<string>"
    }
  ],
  "system": "<string>",
  "max_tokens": 1024,
  "stream": true
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
messages
ChatMessage · object[]
required
Minimum array length: 1
system
string | null
max_tokens
integer
default:1024
Required range: 1 <= x <= 4096
stream
boolean
default:true

Response

Successful Response