TECHNOLOGY

First byte, first chunk and first token are different latencies

In this article
THE QUICK TAKE

The earliest event is not always a useful token. A metric name must match the boundary actually observed.

A stream quickly sends headers and a service comment while the user still waits for an answer. If a metric named TTFT stops at the first byte, its chart improves without a user-visible benefit. Providers need precise boundaries: transport activity, a complete chunk and the first model result describe different events. Measure them together without merging their names.

Define first byte

The first byte describes observed transfer. Depending on tooling, it can refer to response start or another explicit boundary. Even familiar TTFB therefore needs a recorded method. It does not establish pure prefill time or text readiness.

The OpenRouter streaming guide documents comments that are not model-response JSON. They show transport activity but should not automatically end the useful-output timer. Preserve headers, comments and content separately rather than reconstruct the difference from one aggregate number later.

Name first chunk

The current GenAI client conventions describe chunk-level observations. Preserve their status and version because conventions evolve. A network read is also not necessarily an application chunk: the parser first frames events under the selected format.

If an early delta contains only a role, decide whether it qualifies for the measured boundary. Do not silently alter that definition during a library update. A chart is not comparable if the previous parser counted role frames and the new one waits for nonempty content.

Define first token cautiously

The GenAI server metrics separately describe server-side time to first token. That observation need not equal client waiting. Serialization, delivery queues, proxies and networks sit between engine and consumer.

For reasoning models, distinguish internal output start from visible content where the interface exposes enough evidence. A reasoning-related field does not establish an otherwise invisible internal timestamp. Metric names should reflect events actually observed.

Create a deterministic trace

A fake upstream sends headers, a comment, role delta and content with known pauses. Save expected timer outcomes. This validates instrumentation without GPU work or variable generation. Fixture delays are laboratory parameters rather than platform performance claims.

Then run a short request against a real test server and compare observable ordering. If a library hides early frames, state that limitation. Do not infer unobserved timing from another metric’s average over different requests.

Version the SLI

Record start event, stop event, unit, observation side and instrumentation version. Repeat the control trace after interface or library changes. A lower value indicates acceleration only after confirming unchanged definitions and comparable workloads.

Related guides cover throughput and latency and incremental clients. The objective is metric meaning, not model rankings, promised SLAs or measured speed of unknown project resources. Keeping several distinct measurements is useful precisely because it reveals whether a delay moved between transport and generation instead of disappearing.

← All articles