5/30
Part 1 of 7 · Two clocksLearn and do

Stream the tokens, so reading starts with the first one

Streaming decides when the customer starts reading.

When the customer can start reading the 250-token answer
without streaming a blank screen for 7.82 s
streaming, waiting 0.35 s
streaming, reading words arrive as they're written
02468

Same model, same answer, same 7.82 s. Streaming moves when the reading starts.

Without streaming, the server holds the answer until the last token, and the customer stares at a spinner for 7.82 s. With it, each token goes out as soon as it's decoded. Anthropic's API streams with server-sent events, a long HTTP response that the server keeps writing to, when a request sets stream to true. OpenAI's guide puts the reason plainly: "Streaming lets the user start reading before generation finishes."

Predict

With streaming on, which clock does the customer notice first?

Pick an answer above to see the rest