Streaming (AI Responses)
Displaying AI-generated text token-by-token as it is produced, rather than waiting for the entire response to complete.
Streaming is the technique of sending AI model output to the client incrementally, token by token, as it is generated. Instead of waiting 5-10 seconds for a complete response and then displaying it all at once, the user sees text appear in real-time, creating a responsive, conversational experience.
Most AI APIs support streaming via Server-Sent Events (SSE) or similar protocols. The Anthropic SDK, OpenAI SDK, and Vercel AI SDK all provide streaming helpers that handle the protocol details and give you a simple async iterator of tokens.
For vibe coders building AI features, streaming is almost always the right choice for user-facing interactions. The perceived latency drops dramatically: the user starts reading within milliseconds instead of staring at a loading spinner. The implementation is straightforward with modern SDKs: a few lines of code turns a blocking API call into a streaming response.