You can talk to chatbots by using our API if you currently have a paid subscription. You can get API key from: Dashboard Subscription API Keys (First section of the page)

Send message to chatbot

POST https://api.chatfast.io/v1/chat/send-messageSend a message to chatbot and receive corresponding answer.

Request header

X-Api-Keystring
Required

This is your ChatFast API key.

Request body

chatBotIdstring
Required

ID of the chatBot to use. You can find this ID by going to setting of chatbot.

messagestring
Required

The message you want to send to chatbot.

chatIdstring
Optional

The ID of chat session. When user sends the first message you don't need to provide chatId. However, response of chatbot will contain ID of current session, we strongly recommend to use this ID for every API call after as chatbot will maintain the context of conversation.

streamboolean
Optional

If set, partial message deltas will be sent, like in ChatFast. Words/characters will be sent as data-only server-sent events as they become available.

Example

curl --location 'https://api.chatfast.io/v1/chat/send-message' \

--header 'X-Api-Key: {YOUR_CHATFAST_API_KEY}' \

--header 'Content-Type: application/json' \

--data '{

"chatId": null,

"chatBotId": "00000000-0000-0000-0000-123456789012",

"message": "Hello! What can ChatFast do?",

"stream": false,

}'

Response

{

"chatId": "12345678-0000-0000-0000-000000000000",

"response": "Hi! ChatFast helps you create your own GPT chatbot from your data."

}