API Endpoint

The API endpoint for obtaining a streaming response is:

Request Body

To import question-answer pairs, send a POST request to the API endpoint with a JSON request. Here’s an example JSON request:

  • bot_id (string): ID of your bot.
  • question (string): Question.
  • answer (string): Answer.

Example Request

Explore here for example commands to import a single Q-A pair and here for bulk import using the ChatFly API.

Response Body

The streaming response is as follows:

  • id (string): ID of each question-answer pair.
  • bot_id (string): ID of your bot.
  • question (string): Question
  • answer (string): Answer
  • num_token (int): Number of tokens consumed