Basic Usage
Event Types
The stream emits different event types:| Event Type | Description |
|---|---|
delta | A chunk of generated content |
done | The run has completed |
error | An error occurred |
Delta Events
Delta events contain incremental content:Done Events
Done events signal completion and include the run ID:Server-Sent Events (SSE)
The streaming endpoint uses Server-Sent Events (SSE) format, compatible with the OpenAI streaming format. Each event is sent as:Error Handling
Handle errors gracefully in your stream processing:Related
Runs
Sync, async, and polling patterns
Webhooks
Get notified when runs complete