stream message
This block is part of the anthropic group and was last modified in core v15.0.0.
stream message v15.0.0 Send a prompt to Claude and stream the reply token-by-token to a WebSocket channel as it generates, then return the full text.
- flow
flow - connection required
anthropicconnection - memory
anthropicmemoryOptional. A memory (from create memory); prior turns are loaded in and this exchange is appended, so the chat continues across runs.
- prompt required
valueThe user prompt.
- system
valueOptional system prompt (instructions / persona).
- attachments
fileOptional images/PDFs to send with the prompt. For large documents with an expensive model, run them through preflight document first to cut tokens.
- model
valueModel ID. Defaults to the connection's default model. • Suggestions:
claude-opus-4-8claude-sonnet-4-6claude-haiku-4-5 - max tokens
numberMax tokens to generate. Defaults to 16000.
- thinking
conditionEnable adaptive extended thinking.
- cache
conditionCache the system prompt (prompt caching) for cheaper repeated calls.
- effort
valueReasoning effort: low | medium | high | xhigh | max. • Suggestions:
lowmediumhighxhighmax - channel
valueWebSocket channel to broadcast tokens to (the frontend subscribes to it). Leave empty to stream straight to the calling WebSocket connection instead.
- event
valueEvent name for the broadcast frames. Defaults to anthropic_delta.
- flow
flow - connection
anthropicconnection - memory
anthropicmemoryThe memory, passed through with this turn appended; chain it into the next send message.
- success
condition - text
valueThe full reply (also delivered live over the channel/spark).
- usage
objectToken counts plus the call cost: input_tokens, output_tokens, cache_read_input_tokens, cache_creation_input_tokens, cost_usd.
- stop reason
value - partial
value - errors
array<value>Error codes when the call fails (success=false): config_error, internal_error, model_not_allowed, budget_exceeded, concurrency_limit_exceeded, rate_limited, refused, max_tokens, transport_error.
- warnings
array<value>Non-fatal notices: cost_unknown.
- error detail
value - on delta
execute_functionOptional: run this function for every streamed chunk. It receives the chunk, its index and the text so far. Keep it light; it runs synchronously per chunk and a heavy callback slows the stream.
stream |
live message |
streaming chat |
typewriter |
sse |
A typical wiring for stream message: a function trigger starts the flow; value feeds the prompt pin; the function out pin wires to an execute block.

Version history
Introduced in v15.0.0.
Back to
anthropic Return to the main group to view all sub-groups Back to anthropic Return to the group to view all blocks within this group
