WebSocket API
Sending Messages
How to send messages, handle responses, and maintain the WebSocket connection.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
How to send messages, handle responses, and maintain the WebSocket connection.
{
"message": "Your message text here",
"type": "message"
}
{
"type": "recv",
"id": "{message-id}",
"profilepic": "{user-profile-pic}",
"name": "Anonymous",
"content": "Your message text here"
}
{
"type": "message",
"id": "{message-id}",
"profilepic": "{assistant-image-url}",
"name": "Assistant",
"content": "AI response text here"
}
{ "message": true, "type": "typing" }
{ "message": false, "type": "typing" }
{
"message": {
"stamp": "2025-11-06T21:59:02",
"tz": "+04:00"
},
"type": "heartbeat"
}
| Field | Format | Example |
|---|---|---|
stamp | YYYY-MM-DDTHH:mm:ss | 2025-11-06T21:59:02 |
tz | Timezone offset | +04:00, -05:00 |
| Type | Direction | Description |
|---|---|---|
message | Send / Receive | User message (send) or AI response (receive) |
recv | Receive | Confirmation that your message was received |
session | Receive | Session ID on initial connect |
chatowner | Receive | Chat owner info on initial connect |
typing | Send | Typing indicator |
heartbeat | Send | Keep-alive signal (every 15s) |