Streaming sends the answer in small pieces as the model writes them, instead of one block at the end. You turn it on with a request flag.
{
"model": "claude-opus-4-8",
"max_tokens": 1024,
"messages": [{ "role": "user", "content": "Explain streaming." }],
"stream": true
}
Total generation time does not change. What changes is time to first token, the wait before the first word appears: hundreds of milliseconds instead of many seconds. Users read while the model writes, so the app feels fast.
A long single response can also trip a proxy or gateway timeout. Streaming avoids that, and it lets a user stop a wrong answer early.
The cost is complexity. Usage totals arrive at the end, and a check on the full text, such as JSON validation, cannot run before the user sees it.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓