Open SSE stream
const url = 'http://localhost:11044/api/v1/chat/stream';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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
Responses
Section titled “Responses”OK

