# What is time to first token (TTFT)?

**Time to first token (TTFT) is how long a language model takes to start answering: the time from a request being sent to the first piece of output coming back.** It is measured in milliseconds, and for anything a person is waiting on in real time, above all a voice agent on a phone call, it is the latency figure that matters most.

## What counts as the first token

The clock stops at the first output a caller could act on: the first text of the reply, or a tool call on a turn that goes straight to a tool. Two things do not count:

- **An empty opening chunk.** Streaming APIs often open with a chunk that carries a role and no text. Nothing can be spoken from it.
- **Reasoning.** A model that thinks before it answers produces tokens the caller never hears. The time that matters is to the first token of the answer.

Where the clock starts changes the number too. Measured in your own code, TTFT includes the network between you and the provider. Measured at the provider, it does not. Say which one you mean when you compare figures.

## TTFT, tokens per second and total time

These three numbers are often quoted together and mean different things:

| Measure | What it tells you | When it matters |
|---|---|---|
| Time to first token (TTFT) | How long until the answer starts | Voice, chat, anything streamed to a person |
| Tokens per second | How fast the answer arrives once it has started | Long answers, batch jobs |
| Total time (time to last token) | How long until the whole answer is done | Requests that are not streamed |

A model can be quick on one and slow on another. A provider with high tokens per second can still take two seconds to begin.

## Why TTFT is the number for voice agents

A voice agent does not wait for the whole reply. Text-to-speech starts on the first few words and keeps speaking as the rest streams in. People speak at roughly 150 words a minute, which is only a few tokens a second, and hosted models generate far faster than that. So once the answer has started, the model is ahead of the voice and stays ahead.

What the caller hears is the wait before it starts. That wait is the caller finishing, speech recognition, **the model's time to first token**, and the first audio from text-to-speech. Every millisecond of TTFT is a millisecond of silence on the line.

## What is a good TTFT for a voice agent

There is no standard, but there are useful marks:

- **People answer each other in about a fifth of a second.** Research on turn-taking ([Levinson and Torreira, 2015](https://doi.org/10.3389/fpsyg.2015.00731)) puts the typical gap between one speaker finishing and the next starting at around 200 milliseconds. A voice agent has to fit speech recognition, the model and speech synthesis into its pause, so it will be slower than that, and callers tolerate a little.
- **Under about half a second, the model is not the problem.** The reply feels prompt once the other stages are added.
- **Over a second, callers notice.** They say "Hello?", repeat themselves, or start talking over the agent.

The FasterTokens [benchmark](https://fastertokens.com/benchmark) uses those two marks: it reports the share of turns that started within 500 milliseconds and the share that took over a second.

The median is rarely where the trouble is. A model that usually starts in 400 milliseconds and sometimes takes three seconds has a fine median and an agent that goes silent several times a day. See [why first tokens stall](https://fastertokens.com/guides/llm-tail-latency).

## What makes TTFT slow

- **Waiting for capacity.** Large models are usually served on shared hardware. When it is busy, a request queues before the model starts on it.
- **A long or new prompt.** The model has to read the whole prompt before it can answer. Longer prompts take longer, and a prompt it has seen recently can be cached and read faster.
- **Reasoning.** Thinking tokens come before the answer.
- **Distance.** Every network hop between the caller, your agent and the model adds time.

## How to measure TTFT

Stream the response and time the first chunk that carries output:

```python
import os, time
from openai import OpenAI

client = OpenAI(base_url="https://api.fastertokens.com/v1", api_key=os.environ["FASTERTOKENS_API_KEY"])

start = time.perf_counter()
stream = client.chat.completions.create(
    model="deepseek-v4.1-flash",
    messages=[{"role": "user", "content": "Hello?"}],
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta if chunk.choices else None
    if delta and (delta.content or delta.tool_calls):
        print(f"TTFT: {(time.perf_counter() - start) * 1000:.0f} ms")
        break
```

That is TTFT as your code sees it, network included. FasterTokens also reports its own measurement on every response, in the `x-ttft-ms` header: the time from the request reaching the endpoint to the first real output leaving it. The difference between the two is the network between your servers and the endpoint.

Measure many turns, not one. Record every turn's TTFT, look at the 95th and 99th percentiles as well as the median, and count a turn that never answered as the slowest of all instead of leaving it out.

## How FasterTokens keeps TTFT low

FasterTokens is an OpenAI-compatible endpoint for voice agents that serves DeepSeek V4.1 Flash 1017. For every request it queries multiple inference providers simultaneously and optimizes for time to first token, so one provider having a slow moment rarely becomes silence on a call. Its latency is measured around the clock and [published](https://fastertokens.com/benchmark).

Next: [voice agent latency, stage by stage](https://fastertokens.com/guides/voice-agent-latency), or the [quickstart](https://fastertokens.com/docs).
