Skip to main content

Stream text as it is generated

Set stream to true to receive server-sent events instead of waiting for the full response.
Use streaming when you want to render partial output as it arrives.

Long-running requests

Use background responses when work must continue after the initial request returns.