Endpoint
Path Parameters
The generation ID derived from the sanitized topic name.Example:
"Introduction_to_Machine_Learn"See Generate endpoint for ID format.Response Format
This endpoint returns a stream of Server-Sent Events. Each event contains JSON data:Current status of the generation process.Possible values:
connected: Initial connection establishedwaiting: Waiting for generation to startstarted: Generation has begungenerating_content: Creating presentation structuregenerating_scripts: Writing narration scriptsgenerating_audio: Generating voice narrationcombining_audio: Merging audio tracksgenerating_media: Creating slide visualsgenerating_animation: Rendering animationsfetching_image: Downloading imagesgenerating_slide: Creating text slidescomposing_video: Combining slides and audiocompleted: Video generation completeerror: An error occurreddone: Stream ended (final message)
Progress percentage from 0 to 100.
Human-readable status message describing the current step.
Timestamp of the update in
HH:MM:SS format.SSE Connection Details
Headers
The response includes these headers for proper SSE streaming:The
Content-Encoding: none header is critical for SSE to work properly. Without it, some proxies and CDNs may buffer the response.Update Frequency
- Updates are sent when progress changes
- Heartbeat messages sent every 2 seconds to keep connection alive
- Connection timeout: 5 minutes (600 retries × 0.5s)
Connection Lifecycle
- Initial Connection: Sends
connectedstatus immediately - Waiting Phase: If generation hasn’t started, sends
waitingstatus for first 5 seconds - Progress Updates: Streams status changes as generation progresses
- Completion: Sends final status (
completedorerror) followed bydonemessage - Stream Closure: Connection closes after completion or timeout
Example Usage
JavaScript (EventSource)
cURL
The
-N flag disables buffering, which is required for streaming responses.Example Event Stream
Progress Milestones
| Progress | Stage | Description |
|---|---|---|
| 0% | Started | Generation initialized |
| 10% | Content | Presentation structure created |
| 20% | Scripts | Narration scripts generated |
| 30-49% | Audio | Voice narration per slide |
| 50-80% | Visuals | Slides, images, and animations |
| 85-95% | Composition | Final video assembly |
| 100% | Complete | Video ready |
Error Handling
Generation Not Found
If the generation ID doesn’t exist, the stream will sendwaiting status messages for the first 5 seconds, then continue checking until timeout.
Generation Errors
When generation fails, the stream sends anerror status:
done message to close the stream.
Connection Timeout
The SSE connection will timeout after 5 minutes (300 seconds) of waiting. Ensure your client reconnects if the connection drops unexpectedly.