You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-docs.md
+91Lines changed: 91 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,97 @@ curl -X POST "http://localhost:3432/api/generate-message" \
108
108
}'
109
109
```
110
110
111
+
#### POST `/api/generate-message/stream`
112
+
Generates a response from an AI model with real-time Server-Sent Events (SSE) streaming. Ideal for native apps that want to display tokens as they arrive instead of polling.
113
+
114
+
**Authentication**: Session or API Key
115
+
116
+
**Request Body**: Same as `/api/generate-message` (excluding `image_params` since image/video models are not supported for streaming).
117
+
118
+
**Response**: `text/event-stream` with the following SSE events:
119
+
120
+
**Event Types**:
121
+
122
+
1.**`message_start`** - Sent immediately when generation begins
0 commit comments