Core concepts
Streaming
Receive tokens as they are generated with server-sent events.
Set "stream": true on a Messages request to receive the response incrementally as server-sent events (SSE). The event stream matches the Anthropic Messages API exactly, so any compatible client parses it unchanged.
bash · 9 lines
If a stream stops early because max_tokens hit the server ceiling, the response carries an x-spoof-clamped-max-tokens header noting the original value you requested.