Time to first token

ProductionReliabilityPublished By Simon Budziak

Time to first token is the delay between sending a request to a language model and receiving the first token of its response, covering queueing, prompt processing, and initial generation, and it shapes how responsive an AI application feels more than raw generation speed does.

What actually fills the time before the first token?

Surprisingly little of it is generation. The wait stacks connection setup, queueing behind other concurrent requests, and prefill, where the model reads your entire prompt before it may emit anything; prefill cost scales with input length, so a bloated system prompt taxes every single call. Only then does decoding produce the first token. Prompt size is the lever you control most directly: trim what you send, and keep a stable prefix so prompt caching lets repeated context skip reprocessing entirely.

TTFT or tokens per second: which should you optimize?

They answer different complaints. Low TTFT removes the silent pause before anything appears at all, which dominates chat, voice, and copilot interfaces where a user is watching an empty screen. Output speed decides how long a long answer takes to finish once it starts. Users judge responsiveness by the first token they see, not the last, so interactive products optimize TTFT first and treat sustained throughput as the second metric. Track both alongside end-to-end inference latency in llm observability dashboards, measured as percentiles rather than a single flattering average.

Frequently asked questions

What is a good time to first token?

Interactive applications generally aim for well under a second so streaming feels immediate. The right target depends on the interface: voice assistants and chat tolerate the least, while background batch jobs barely care about this metric at all.

Why did our time to first token get worse?

Usually one of three things: prompts grew longer, traffic rose enough to queue requests behind each other, or prompt caching stopped hitting because the shared prefix changed between calls. Compare traces from before and after the change to see which one moved.

Summarize this page with

Train your team to build this