Roll up the latency between two event types into a chart-ready summary.
Pairs each start_event_type event with its matching end_event_type event
and reports the duration between them: bins (a time series over the
window), heatmap (time against latency band), summary (pair count with
p50/p95/p99 and max), events (window totals), and, when
distribution_key_paths is given, a distribution broken down by that key.
This is how the tools, models and hooks pages are drawn.
start_event_type and end_event_type are required and must differ;
anything else returns 400. ts_to defaults to now, and omitting ts_from
spans back to the oldest matching event rather than a fixed window — check
bounds in the response for what was actually covered. bin_count defaults
to 24 and is clamped to 1–168. The distribution names the top 10 keys and
rolls the rest into a single (other) entry, so it still sums to the window
total.
Two behaviours worth knowing. payload_sum_paths can only sum duration_ms,
input_tokens and output_tokens — any other path is ignored silently and
its sums entry stays 0. And sums count only the closing event of each pair,
so token usage reported on both legs is not double-counted.
Authorizations
Query Parameters
Response
The latency rollup: bounds, bins, heatmap, summary, events, and optionally distribution.

