Most AI applications wait for the model to generate the complete answer before showing anything to the user.

For short answers, that may be acceptable. For longer responses, it can make the application feel slow—even when the model is already generating tokens.

Streaming solves this by displaying each part of the response as soon as it arrives.

The non-streaming version

A standard OpenAI-compatible request may look like this: