Sending a question (realtime)

Body Params
string
required

The question you want to send to the AI.

string
required
string
required
string
required

The website ID you trained the AI on.

string
required

An unique identifier for your visitor.

string
required

An unique identifier for the current session.

string

In case you have multiple topics, you can give each a different name.

string

Optional segment to search in

string

You can provide an audienceId to be used for content lookup. Use comma-separated id's to supply multiple.

json

Send an additional metadata object that we'll show in the dashboard.

string
enum
Defaults to md

You can set this value to 'html' if you want the messages formatted as html instead of markdown

Allowed:
boolean
Defaults to false

The AI will validate if the question asked is in the same language as the current conversation language. If that doesn't match, the AI will send back a command to switch the conversation language. You can turn off this language check using this property, which means the AI will always respond in the conversation language.

string
required

Our chat-data wrapper for managing history. See the response at the right for an example. To maintain a proper history, which is important for follow-up questions and logging, you should supply this with every query (except the first query).

Headers
string
required

Your API key from account settings

Responses

Language
Request
Response
Choose an example:
application/json