POST
/
ai
/
ai_extensions
/
ai_answer_assist
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
  "smart_chat_assistant_id": "65d5f3473d5d68095462165d",
  "message": "Who are you?",
  "history": [
    {
      "role": "assistant",
      "message": "History message"
    },
    {
      "role": "user",
      "message": "Hi"
    },
    {
      "role": "assistant",
      "message": "Hello! How can I assist you today?"
    }
  ]
}' \
https://api.quickblox.com/ai/ai_extensions/ai_answer_assist
{
  "answer": "Hello! How can I assist you today?"
}

Before call make sure that AI Answer Assist feature enabled on admin dashboard, otherwise you will get 405 error.

Body Parameters

smart_chat_assistant_id
string
required

Smart Chat Assistant id.

message
string
required

Message you want to get answer for. The maximum length for the message is 2000 symbols.

history
array

Conversation history. Used to add context.

Headers

QB-Token
string
required

A user or application session token. See our Authentication page to learn more about session tokens.

Responses

curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: eddf864695d72d33b959eec2ae6c640d817dfada" \
-d '{
  "smart_chat_assistant_id": "65d5f3473d5d68095462165d",
  "message": "Who are you?",
  "history": [
    {
      "role": "assistant",
      "message": "History message"
    },
    {
      "role": "user",
      "message": "Hi"
    },
    {
      "role": "assistant",
      "message": "Hello! How can I assist you today?"
    }
  ]
}' \
https://api.quickblox.com/ai/ai_extensions/ai_answer_assist
{
  "answer": "Hello! How can I assist you today?"
}