Messages
Create messages using the Anthropic Messages API format.
Create a non-streaming message.
Create a streaming message that delivers tokens as they are generated.
Streaming responses use Server-Sent Events (SSE). The key event types are:
- - Initial message metadata
- - Start of a content block (text, tool use, etc.)
- - Incremental content updates
- - End of a content block
- - Final message metadata (stop reason, usage)
- - End of the message
Was this helpful?