Anthropic Stream Event Viewer
Decode an Anthropic Messages SSE stream into text, thinking and tool_use blocks, stop_reason and token usage including cache writes and reads.
Anthropic Stream Event Viewer
14 events parsed, 3 content blocks reconstructed
Message
Usage
Reconstructed content blocks (3)
{"model":"sonnet"}{
"model": "sonnet"
}Event counts
Event timeline
| # | type | summary |
|---|---|---|
| 0 | message_start | model=claude-opus-4-7 |
| 1 | content_block_start | idx=0 type=thinking |
| 2 | content_block_delta | idx=0 delta=thinking_delta |
| 3 | content_block_delta | idx=0 delta=thinking_delta |
| 4 | content_block_stop | |
| 5 | content_block_start | idx=1 type=text |
| 6 | content_block_delta | idx=1 delta=text_delta |
| 7 | content_block_stop | |
| 8 | content_block_start | idx=2 type=tool_use name=get_pricing |
| 9 | content_block_delta | idx=2 delta=input_json_delta |
| 10 | content_block_delta | idx=2 delta=input_json_delta |
| 11 | content_block_stop | |
| 12 | message_delta | stop_reason=tool_use |
| 13 | message_stop |
What this tool does
The Anthropic Stream Event Viewer decodes a raw message_stream from the Claude API, parsing typed events like message_start, content_block deltas, tool_use, and thinking. It reconstructs the full reply and stop_reason and breaks down per-call token usage, including cache-write and cache-read counts, so you can debug streaming and verify billing in your browser.
Updated . Provided as is. Check the output before you rely on it in production.
How to use Anthropic Stream Event Viewer
- 1
Drop the message_stream log
Paste a raw Anthropic SSE capture — the typed event names like message_start, content_block_delta, and message_stop must remain on their own lines, with JSON payloads on data lines.
- 2
Read the message header
The Message panel surfaces the message id, model, role, and stop_reason as soon as those events arrive. A short note explains every stop_reason value (end_turn, tool_use, max_tokens, refusal, pause_turn).
- 3
Walk reconstructed content blocks
Text, thinking, and tool_use blocks are reassembled from their deltas. tool_use blocks show the accumulated partial_json and parse it once it becomes valid JSON so you can verify tool inputs end-to-end.
- 4
Audit usage and the timeline
The Usage panel separates input, output, cache_creation_input_tokens, and cache_read_input_tokens. The event timeline lets you click any event to see its full JSON payload for deeper debugging.
Questions and answers
Which events does it understand?
How are content blocks reconstructed?
What does the usage panel show?
Does it send my data to a server?
How does it differ from a generic SSE replayer?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/anthropic-stream-event-viewer/
For automation planning, fetch the canonical contract at /api/tool/anthropic-stream-event-viewer.json.