API Endpoint

The API endpoint for obtaining a streaming response is:


Request Body

To get a streaming response, send a POST request to the API endpoint with a JSON request. Here’s an example JSON request:

  "bot_id": "xxxx-xxxx-xxxx-xxxx",
  "message": "string",
  "session_id": "xxxx-xxxx-xxxx-xxxx"
  • bot_id (string): ID of your bot.
  • message (string): Message from the user.
  • session_id (string): ID of the session.

Example Request

Here are example commands to obtain a streaming response using the ChatFly API:

curl -N -X POST "https://backend.chatfly.co/api/chat/get-streaming-response" \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
  "bot_id": "xxxx-xxxx-xxxx-xxxx",
  "message": "string",
  "session_id": "xxxx-xxxx-xxxx-xxxx"

Response Body

The streaming response is as follows:

ChatFly is an AI-powered platform that specializes in building chatbots. It offers a range of products and services to empower businesses in various sectors, including teaching, education, knowledge management, and customer support. With ChatFly, you can create your own chatbot using your data, without the need for coding. Our AI technology enables faster response times, reducing resolution times by an average of 37%. Additionally, ChatFly can act as tier 1 support, answering 39% of inquiries on its own. Implementation is quick and easy, taking only 57 seconds to install. We offer flexible pricing based on usage, with no annual contracts or price per user. Our chatbot seamlessly integrates with your favorite tools, making it effortless for teams and visitors to interact with it.
  • string (string): A string of the response.

Result with Python, equivalent to JavaScript and Curl:

response streaming