Learn how to stream model responses from the OpenAI API using server-sent events.
stream=True
in your request to the Responses endpoint:
type
property of the event.
Some key lifecycle events are emitted only once, while others are emitted multiple times as the response is generated. Common events to listen for when streaming text are: