Skip to main content

WebSocket Notifications

GenAIPro provides real-time notifications for Labs task status changes via WebSocket.

Connection

Connect to the WebSocket endpoint:
wss://genaipro.vn/ws
Authentication is done via the same Bearer token sent as a query parameter or in the connection headers.

Events

When a Labs task changes status, you will receive a message with the task update:
{
  "type": "labs_task_update",
  "data": {
    "task_id": "...",
    "status": "completed",
    "result_url": "..."
  }
}

Task Statuses

StatusDescription
pendingTask is queued
processingTask is being processed
completedTask finished successfully
failedTask failed