Realtime methods
Methods for live messaging between users, devices, or services over a persistent WebSocket connection. Use transport: "ws" for the best realtime experience.
Methods
Method
Description
send()
Send structured JSON payloads (text, image, audio, custom types)
sendBinary()
Send raw byte buffers without JSON wrapping
When to use realtime methods
1:1 or multi-recipient chat
Live notifications pushed to
onMessageBinary or large structured payloads with automatic chunking
For AI, RAG, and workflows, prefer transport: "http" β see Transport matrix.
Language pages
Related
Chat methods β history fetch/delete
Types & payloads β message shapes
Last updated