Skip to main content
Set stream: true to receive Anthropic-style event streams. Use this when your client already expects message_start, content_block_delta, and message_stop events.

Enable Streaming

Event Lifecycle

Per the protocol tests, a normal text stream begins with message_start and ends with message_stop.

Tool Streaming

Tool argument deltas appear as content_block_delta with type: input_json_delta.

Thinking Streaming

Thinking-related data can appear before text blocks, including signature_delta events.

What to listen for

  • message_start for the initial message frame and input usage
  • content_block_start and content_block_delta for text, tool, and thinking blocks
  • message_delta for stop reason and final output usage
  • message_stop for stream completion

Common mistakes

  • assuming every content_block_delta is text
  • ignoring message_delta and losing final usage information
  • treating Messages streams like chat chunks or Responses semantic events