By default, an API call to Claude waits for the entire response to be generated and then delivers it in one piece. For a two-sentence answer that is fine. For a multi-page report, it means your user watches a spinner for the full generation time, and every network component between your server and the platform must tolerate a long silent connection. Streaming changes the delivery: tokens arrive incrementally as the model produces them. It is supported on all four platforms (Bedrock, Vertex AI, Foundry, and Claude Platform on AWS) and for anything beyond short outputs it should be your default, for two independent reasons.
Reason one: perceived latency is what users feel
Users do not experience total generation time; they experience the wait before something happens. With streaming, the meaningful number becomes time-to-first-token, which is typically a small fraction of total duration for a long answer. The moment words start appearing, the interaction reads as responsive, and users start reading while the model is still writing, so much of the generation time overlaps with reading time instead of preceding it. Chat interfaces trained everyone to expect this; a business app that sits silent for a long generation now reads as broken even when it is working perfectly. Streaming also improves failure UX: if a request dies partway, the user sees partial progress and a clear error rather than a spinner that eventually gives up with nothing to show.
Reason two: idle connections get killed
The quieter benefit is operational. Load balancers, API gateways, proxies, and serverless platforms all enforce idle and total-duration timeouts, and a non-streaming request for a long generation looks exactly like a hung connection: one request, then silence until the platform sends everything at once. Somewhere in a typical enterprise network path, a component will cut that silence off, and you will see spurious timeout errors that occur only on long outputs, only in some environments, and only sometimes. A streaming connection carries steady traffic, so idle timers keep resetting and intermediaries leave it alone. Teams that adopt streaming late usually arrive there by debugging exactly this class of ghost timeout; adopting it early skips the investigation.
What streaming looks like in code
The Python SDK makes streaming a small change, and the same pattern works across platforms because the client classes share an interface. Here it is on Claude Platform on AWS:
from anthropic import AnthropicAWS
client = AnthropicAWS() # uses AWS_REGION + ANTHROPIC_AWS_WORKSPACE_ID
with client.messages.stream(
model="claude-sonnet-5",
max_tokens=4096,
messages=[{"role": "user",
"content": "Draft a summary of the attached policy."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
In a real application, your backend relays those chunks to the browser (server-sent events are the common choice) and the frontend appends them as they arrive. Remember that the pieces between Claude and the user must also pass increments through promptly: a proxy that buffers whole responses quietly cancels the benefit.
Details that bite later
A few second-order points are worth designing for up front. Anything that consumes the full response (logging token usage, validating JSON structure, running safety checks, triggering side effects) must wait for the end of the stream; usage data arrives with the final events, so your observability wrapper should capture it there. Structured outputs meant for machines gain little from streaming and are awkward to validate mid-flight, which is why short system-to-system calls are the legitimate non-streaming niche. Handle client disconnects deliberately: if the user closes the tab mid-generation, decide whether to cancel upstream or let it finish for the log. And streaming complements retries rather than replacing them; a stream that fails near the end still needs the retry and idempotency thinking covered elsewhere in this guide.
Where to go next
Pair this with Retries, Timeouts, and Fallbacks for the failure-handling half, and see Adaptive Thinking: When to Let Claude Reason Longer for the workloads where generations get long enough that streaming stops being optional. The quickstart has first-call examples per platform.