Connecting
Open an SSE connection to the progress endpoint:Content-Type: text/event-stream.
Event types
connected
Sent immediately when the connection opens. Contains the current job state.
connected event includes progress: 100 and the stream closes immediately.
progress
Sent as the job progresses through the moderation pipeline.
Event data fields
Stream lifecycle
- The stream closes automatically when
progressreaches 100 orstatusiscompletedorfailed. - A keepalive comment (
: keepalive) is sent every 15 seconds to prevent connection timeouts. - If the client disconnects, the server cleans up the subscription.