AI GLOSSARY · AI CONCEPTS
Time to first token (TTFT)
Definition
Time to first token measures the interval from a stated request-start boundary until the first output token is produced or observed at a stated endpoint.
Also called: TTFT, time to first token, time-to-first-token.
In plain language
TTFT describes how long one model request takes to begin returning output. Its meaning depends on the boundaries: a service may measure from accepting the request to emitting its first token, while a client may measure from sending the request to receiving the first relevant streamed event. Network transit and rendering can make the first visible text appear later. Retrieval, tools, routing or earlier model calls outside that request contribute to the agent’s total user-visible wait, not to that request’s TTFT. A token is a model unit and need not be a complete displayed word.
Technical definition
TTFT is an interval between an explicitly named request-start event and first-token event. A server-side measurement can run from request acceptance to first output-token emission; a client-side measurement can run from request transmission to receipt of the first nonempty text delta. These differ because client timing can include network transit. First visible text may occur later because an event can contain multiple tokens and the application may buffer or render it afterward. For at least two output tokens, average time per output token after the first can be written as (end-to-end request latency - TTFT) / (number of output tokens - 1). The denominator is invalid for zero or one output token, so those cases require separate handling rather than a mathematical TPOT value.
Worked examples
Self-contained illustrations work through the concept directly. Their scenarios and results are explanatory, not measured model-performance claims.
Illustrative example · not a measured performance result
Separate service TTFT from the user’s wait
- Scenario
- This is an explicitly hypothetical, illustrative timeline for one streamed model request inside an agent. It is not a measurement of an actual service.
- Demonstration
- Suppose the service accepts the request at 0 ms, emits the first output token at 200 ms and emits the fourth and final output token at 800 ms. At that service boundary, TTFT is 200 ms. With four output tokens, the average intertoken interval after the first is (800 - 200) / (4 - 1) = 200 ms. If an external app performs work before this request or adds network and display delay afterward, that time increases the user’s wait but does not become this request’s service-measured TTFT.
- What it shows
- Record both endpoints with every TTFT result, and measure external app work, client receipt, first visible text and completion separately when diagnosing an agent’s responsiveness.
- Limits
- The evenly averaged interval does not reveal variation between individual token events. Tokens may not correspond to displayed words, and a streamed event may carry more than one token.
How it shows up when you use agents
In an agent interface, the pause after an action is not automatically TTFT. The complete user wait can include routing, retrieval, external tools, several sequential model requests, retries, network transit and rendering. TTFT applies to one identified model request. Measure it from a stated request-start boundary to a stated first-token boundary.
For service timing, the start might be when the service accepts the request and the end when it emits the first output token. For client observation, the start might be when the client sends the request and the end when it receives the first nonempty text delta. Network transit can make the client interval longer. The first user-visible text is another boundary because the application may buffer, inspect or render received content later. A token is a model unit, not necessarily a complete displayed word.
When diagnosing an agent, record a timeline rather than attaching one TTFT label to the entire interaction. Track external preparation, each model request, each tool call, client receipt, first visible text and completion. Retrieval or tool work completed before a particular request contributes context and user delay, but it does not become that request’s TTFT. Sequential calls increase the full agent wait; measure TTFT independently for each streamed model request.
Common confusions
TTFT is not time to first byte. A transport can deliver headers or other bytes before an output token. It is also not all LLM latency: total request latency continues until completion, while an agent’s end-to-end latency can span multiple requests and tools.
Do not compare TTFT figures unless their start and observation boundaries match. A server-emission measurement and a client-receipt measurement answer different questions. Likewise, fast first output does not imply fast completion or any particular answer quality.
For post-first-token timing, use at least two output tokens before calculating (end-to-end latency - TTFT) / (output tokens - 1). Inspect inter-output gaps separately when streamed events can bundle tokens. The practical reader action is to label every recorded timestamp and optimize the stage that actually accounts for the observed wait.
Related terms
More in AI concepts
Sources
- Reducing latency - Claude API documentation, Anthropic (accessed 2026-11-25)
- Latency optimization - OpenAI API documentation, OpenAI (accessed 2026-11-25)
- Metrics - vLLM documentation, vLLM project (accessed 2026-11-25)
Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.
Review record
Last verified
Drafted by claude-sonnet-5-5; revisions: OpenAI Codex (configured gpt-5.6-sol); sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .
Change log (5)
- : Independent full source/reader review plus bounded self-link closure completed. Standalone example is explanatory, not a measured service or hardware benchmark. New-feature runtime gate recorded separately; publication disabled.
- : Private source-based correction with self-contained illustration; independent full source/reader and new-feature runtime gates pending. Example is illustrative, not a measured model benchmark.
- : First version.
- : Verifier pass: corrected claims against sources.
- : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.