LLM Stream Replay Visualizer
Paste a captured SSE stream, replay it event by event, and inspect timing, deltas and provider payloads locally.
Captured SSE text
457 chars · 5 eventsDecoder settings
5 timeline entriesReplay
457 / 5 events · openaiMetrics
2 delta pieces · 11 chars · TTFT 1000 ms · 5.0 pieces/s
Gaps: mean 750 ms · median 1000 ms · p95 1000 ms · max 1000 ms · 3 slow
Assembled text
Hello world
Timeline
| # | t+ | Gap | Kind | Payload summary |
|---|---|---|---|---|
| 1 | 0 ms | 0 ms | meta | role: assistant |
| 2 | 1000 ms | 1000 ms | content | delta: Hello |
| 3 | 2000 ms | 1000 ms | content | delta: world |
| 4 | 3000 ms | 1000 ms | stop | finish_reason: stop |
| 5 | 400 ms | 0 ms | stop | [DONE] — stream ended |
Examples
OpenAI with timestamps
Bundled OpenAI sampleHello world · TTFT 1000 msRecorded created fields give real offsets; the first content event lands one second after stream start.
Anthropic with pings
Bundled Anthropic sampleBonjour le monde · ping excludedKeepalives remain visible in the timeline but do not inflate the piece rate.
Malformed capture
Bundled broken sample1 content row + 1 malformed rowOne invalid JSON event is isolated while the rest of the stream still replays.
About this tool
The LLM Stream Replay Visualizer turns a captured Server-Sent Events response into a timeline you can inspect and replay. It parses SSE according to the WHATWG grammar — blank-line dispatch, multi-line data fields, comments, CR/LF/CRLF endings and the `[DONE]` sentinel — then decodes OpenAI chat completion chunks or Anthropic message events.
Replay the capture at quarter, normal, quadruple or instant speed, step one event at a time, and watch the answer assemble while the corresponding timeline row highlights. Metrics cover delta pieces, characters, first-content latency, inter-event gaps and slow-gap counts; a small waterfall marks gaps above a configurable threshold.
The tool never pretends to know wall-clock timing that is not in the capture. If payloads carry timestamps it labels the timing as recorded; otherwise it labels it pacing-relative. Everything runs locally — pasted captures, optional file content and live-recorded chunks stay in the tab.
What this tool does not do
- No real tokenizer is used; rates are delta pieces and characters per second.
- Pasted captures without payload timestamps have no measurable wall-clock latency.
- The live recorder posts a minimal JSON body and is meant for local development endpoints, not authenticated APIs.
How to use this tool
Capture a stream
Save the raw body of a streaming response (for example `curl -N` output) as text, or use the optional local recorder against a URL you control.
Paste or load a sample
Paste the capture into the input pane or click one of the bundled OpenAI, Anthropic or malformed examples.
Replay and inspect
Choose a speed, press Play or Step, and click any timeline row to jump the replay cursor to that event.
Export findings
Copy the one-line metrics summary or download the timeline CSV and metrics JSON for a bug report.
Use cases
First-token debugging
See whether a slow TTFT comes from the server, the gateway or a long gap between deltas.
Provider payload education
Show the difference between OpenAI chunk shapes and Anthropic event types side by side.
Bug reports
Export a compact timeline and metrics summary that reproduces the timing story without sharing the whole transcript.
Event kinds
| Kind | Meaning |
|---|---|
| content | A text delta (OpenAI delta.content or Anthropic text_delta) |
| meta | Role announcements, message start/stop and usage fragments |
| ping | Anthropic keepalive events, excluded from tokens/s |
| stop | finish_reason or the OpenAI [DONE] sentinel |
| malformed | A data line that could not be decoded; other events still replay |
Delta pieces are counted instead of model tokens: real token counts require a tokenizer and are deliberately not invented here.
Common mistakes
Mistake:Calling delta pieces tokens.
Fix:The tool counts pieces and characters; use a tokenizer tool if you need billing-grade token counts.
Mistake:Trusting timing from a pasted capture with no timestamps.
Fix:Look for the pacing-relative badge — those numbers describe replay speed, not measured latency.
Mistake:Expecting a live connection by default.
Fix:Recording is opt-in and calls only the URL you type; everything else is entirely offline.
Mistake:Dropping a capture because one event is malformed.
Fix:Malformed events get their own row with a warning; valid events continue to replay.
Frequently asked questions
How do I capture a stream with curl?
Run your request with -N to disable buffering and redirect the raw response body to a file, for example `curl -N -s https://your-endpoint -d @request.json > capture.txt`. Paste that file's contents into the tool; no headers or keys are needed.
What counts as a token here?
A delta piece: one content-bearing SSE event. The tool also reports characters, because a real token count requires the model's tokenizer. Rates are labeled pieces/s and chars/s rather than pretending to be tokens/s.
Why is my first-token latency high?
Look at the waterfall: a long first gap before the first content row usually means provider queueing or gateway setup. Gaps between content rows point to generation speed or network chunking. If the badge says pacing-relative, the capture has no timestamps and no real latency can be inferred.
Does it support Anthropic ping events?
Yes. Pings are decoded into a keepalive row, displayed in the timeline and excluded from content-piece metrics. Anthropic message_start, content_block_delta and message_delta events are recognized too.
Can it record live from my local server?
Optionally. Enable the recorder, enter a URL you control (typically localhost), and the tool posts a minimal streaming request, timestamps incoming chunks and analyzes the capture like any pasted stream. Nothing is uploaded to a third party.
Is my captured stream uploaded?
No. Parsing, decoding and metrics all run in your browser. Paste mode never makes a network request, and the optional recorder only connects to the endpoint you explicitly type.
References & standards
Related tools
Agent Tool Flowchart Builder
Design agentic tool-call DAGs with decision branches and bounded loops. Validates reachability, cycle handling, and emits clean Mermaid flowcharts — fully in your browser.
AI Agent Memory & Buffer Simulator
Compare sliding window, summary buffer, and vector memory strategies
AI API Client SDK Generator
Generate typed API client SDK files from OpenAPI specifications or cURL requests
AI Code Explainer
Explain code snippets with grounded cloud AI
AI Code Security Auditor
Scan source code for high-confidence OWASP Top 10 vulnerabilities
AI Code Translator
Translate code into idiomatic implementations in another language