DevTools Logo

LLM Stream Replay Visualizer

LLM Stream Replay Visualizer

Paste a captured SSE stream, replay it event by event, and inspect timing, deltas and provider payloads locally.

Runs in your browseropenairecorded timing
Try an example

Captured SSE text

457 chars · 5 events

Decoder settings

5 timeline entries

Replay

457 / 5 events · openai

Metrics

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+GapKindPayload summary
10 ms0 msmetarole: assistant
21000 ms1000 mscontentdelta: Hello
32000 ms1000 mscontentdelta: world
43000 ms1000 msstopfinish_reason: stop
5400 ms0 msstop[DONE] — stream ended
Playing: no Cursor: 457

Examples

OpenAI with timestamps

Input
Bundled OpenAI sample
Output
Hello world · TTFT 1000 ms

Recorded created fields give real offsets; the first content event lands one second after stream start.

Anthropic with pings

Input
Bundled Anthropic sample
Output
Bonjour le monde · ping excluded

Keepalives remain visible in the timeline but do not inflate the piece rate.

Malformed capture

Input
Bundled broken sample
Output
1 content row + 1 malformed row

One 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

  1. 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.

  2. Paste or load a sample

    Paste the capture into the input pane or click one of the bundled OpenAI, Anthropic or malformed examples.

  3. Replay and inspect

    Choose a speed, press Play or Step, and click any timeline row to jump the replay cursor to that event.

  4. 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

KindMeaning
contentA text delta (OpenAI delta.content or Anthropic text_delta)
metaRole announcements, message start/stop and usage fragments
pingAnthropic keepalive events, excluded from tokens/s
stopfinish_reason or the OpenAI [DONE] sentinel
malformedA 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