Skip to main content

AI chat stream

POST 

/v2/chat/stream

Plan Access
PAYG or Enterprise
Data Recency
Not applicable to this endpoint
Rate Limit
60 to 120 RPM by plan

Stream a response from Elfa AI using Server-Sent Events (SSE).

Use this when your client can consume incremental events. Use POST /v2/chat instead when your integration needs a complete JSON response.

Access: PAYG and Enterprise API keys.

Response format: text/event-stream.

Common data: event payloads include:

  • session_info with sessionId and analysisType
  • title with a generated session or analysis title
  • text with incremental Markdown content
  • text_complete when incremental text has finished
  • status with progress updates
  • credits with consumed credits
  • complete with final sessionId, success, and creditsConsumed
  • invalid_request when a query is rejected by safety checks
  • error for stream failures

A : keep-alive comment may be sent during long gaps. The stream ends with data: [DONE].

Request-body semantics match POST /v2/chat: message is required only for analysisType: "chat"; token and account modes use assetMetadata.

Request

Responses

SSE stream established (text/event-stream)