Skip to content

Open SSE stream

GET
/api/v1/chat/stream
curl --request GET \
--url http://localhost:11044/api/v1/chat/stream \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

Opens a Server-Sent Events stream for receiving chat responses, background events, and progress updates. Creates a headless chat session if no session exists for this user and no sessionId is given. Pass sessionId to open (or switch to) one of the user’s persisted sessions — see GET /chat/sessions for the list. Multiple clients can connect simultaneously and all will receive events.

sessionId
string

Id of one of the caller’s persisted sessions to open, or switch to from the one attached, as listed in sessionId by GET /api/v1/chat/sessions. Omitted, the session already attached is reused, or a new one is created when there is none. An id that is unknown or not the caller’s attaches nothing: the stream still opens, and says so with a session-error event rather than an HTTP error

OK

Media typetext/event-stream
object
timeout
integer format: int64