Server → Client Message Format
All WebSocket responses use this envelope:
{
"event": "event-name",
"data": {}
}
Runtime Event List
auth-connect-completeset-model-completepongconv-messagemessageerror
Quick Examples
Authentication success
{
"event": "auth-connect-complete",
"data": {
"ok": true,
"clientId": "uuid",
"timestamp": 1739765563421
}
}
Conversation metadata
{
"event": "conv-message",
"data": {
"ok": true,
"conversationId": "conv-xxxx",
"messageId": "msg-xxxx",
"timestamp": 1739765563421
}
}
Stream chunk
{
"event": "message",
"data": {
"ok": true,
"conversationId": "conv-xxxx",
"messageId": "msg-xxxx",
"output": "x",
"tokens": 1,
"stop": false
}
}
Error
{
"event": "error",
"data": {
"ok": false,
"code": 4002,
"error": "Prompt is required",
"clientId": "uuid",
"timestamp": 1739765563421
}
}
For full field definitions, refer to Chat Response Commands.