Skip to main content

Generate Text Stream

GET 

/api/ai/generate/stream

Generate text using AI with Server-Sent Events streaming.

Authenticated via the httpOnly session cookie (resolved by get_authenticated_user_context). EventSource can't send an Authorization header but does send cookies (withCredentials), so the JWT is NOT passed in a ?token= query param anymore — that leaked the session token into access logs, proxy logs, browser history, and Referer headers.

Request

Responses

Successful Response