What you will be able to do
- Tell apart time to first token and output speed, and pick the lever that improves each one
- Decide when fast mode is justified and what it does and does not change
- Weigh retrieval depth, reranking, task budgets, max_tokens and an elapsed-time clock against latency and accuracy
1.What 'latency' means, and the basic levers
Before you can justify a latency trade-off, you need to know which latency matters. Baseline latency is the time the model takes to process the prompt and generate the response. Time to first token (TTFT) is the time from sending the prompt until the first token comes back. TTFT matters most when you stream and want an interface that feels responsive.
The most direct lever is model selection. For speed-critical applications, Claude Haiku 4.5 offers the fastest response times while keeping high intelligence. The second lever is token count: the fewer tokens the model has to process and generate, the faster the response. So keep prompts clear but concise, ask for shorter answers, and set sensible output limits. The third lever, streaming, does not make generation faster. It lets users watch the output arrive, which significantly improves perceived responsiveness.
| When you need | Consider starting with | Example use cases |
|---|---|---|
| The highest available capability | Claude Fable 5.1 | Agent sessions that run for hours, multistep deep research |
| Complex agentic coding and enterprise work | Claude Opus 5.5 | Multihour autonomous coding agents, large-scale refactoring |
| Speed and capability for everyday workloads | Claude Sonnet 5.5 | Code generation, data analysis, agentic tool use |
| The lowest latency and price, with extended thinking | Claude Haiku 4.5 | Real-time applications, high-volume processing, sub-agent tasks |
Checkpoint 1 of 5· Match them up
Match each latency term or lever to what it describes.
Tap a term, then the definition that fits it.
TTFT and baseline latency are measurements. Streaming improves how fast the app feels, and cutting tokens reduces the actual work the model does.
“Time to first token (TTFT): This metric measures the time it takes for the model to generate the first token of the response”Source: platform.claude.com
Sources1
2.Fast mode: paying for output speed, not intelligence
Fast mode is unusual among latency levers because it costs no accuracy: you pay money for speed. It delivers up to 2.5x higher output tokens per second on Claude Opus 5.5, Claude Opus 5 and Claude Opus 4.8. You opt in with speed: "fast" and the fast-mode-2026-02-01 beta header. The gain is in output speed (OTPS), not TTFT, so it shows most clearly with streaming and on long outputs. If your bottleneck is the wait before the first token, fast mode is the wrong fix.
response = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=4096,
speed="fast",
betas=["fast-mode-2026-02-01"],
messages=[
{"role": "user", "content": "Refactor this module to use dependency injection"}
],
)Fast mode has constraints you should account for. On Claude Opus 5.5 it costs $8 per million input tokens and $40 per million output tokens, and prompt caching multipliers apply on top. Switching between fast and standard speed invalidates the prompt cache, so flipping speed per request throws away the largest free win. It isn't available with the Batch API, which makes sense because batch work is not latency-sensitive anyway. When fast-mode rate limits are hit, the API returns a 429. You can either wait for the short retry-after delay or catch the error and fall back to standard speed.
Checkpoint 2 of 5· Check yourself
A streaming coding assistant on Claude Opus 5.5 feels slow because long answers take a while to finish rendering. The first token already arrives quickly. Which statement about adding fast mode is correct?
Fast mode targets output speed, which is exactly the bottleneck here. It is premium-priced and not available with the Batch API.
“Speed benefits are focused on output tokens per second (OTPS), not time to first token (TTFT)”Source: platform.claude.com
Sources2
3.Agent runs: elapsed time, task budgets and max_tokens
In long agent loops, wall-clock time and cost come from how much the model searches, re-verifies and tests. Three controls act on this, and they do different jobs.
An elapsed-time clock is the direct latency lever: tell the model that time matters and show it the elapsed time. On three benchmarks, runs took 33% to 69% less time at 28% to 54% lower cost per task, with scores up to 1.9 points lower. That is a real accuracy-for-speed trade, and you justify it when finishing sooner matters more than the last point of score.
A task budget works because the model can see a live token countdown and regulates itself. On SWE-bench Pro, a generous budget cut cost per task by 44% for about 3 points of pass rate, and the tightest budget cut it by 58% for 6 points. Task budgets are in beta (beta header task-budgets-2026-03-13) on the most recent models. Budgets below the 20,000-token floor are rejected, and very tight budgets can produce refusal-like behavior. Set the budget once, on the first request, because a mid-task change invalidates the cache. Above all, the budget is advisory: it steers the model rather than stopping it, so verify adherence on your workload before you rely on it as a cost control.
max_tokens is different. It caps a single response without the model knowing, so the model doesn't economize. Turns that needed the room are simply cut off, and they are still billed. Thinking counts toward max_tokens even when the thinking content isn't returned. Lowering the cap cut cost per attempt but left cost per solved task about the same. So set max_tokens high (64,000 for agentic work, or 128,000 when a cut-off attempt is costly), treat stop_reason: max_tokens as a failure, and use effort and task budgets to save money.
Checkpoint 3 of 5· Check yourself
To make an agent cheaper and faster, a developer lowers max_tokens from 64,000 to 16,384. What does the measured evidence predict?
max_tokens is invisible to the model, so it doesn't adapt. Capped runs cost less each but solve proportionally less. The 20,000-token floor applies to task budgets, not max_tokens.
“max_tokens caps a single response, invisibly to the model, so lowering it does not make the model economize.”Source: platform.claude.com
4.Retrieval depth and reranking: the same trade-off inside the pipeline
The same reasoning applies before the model is ever called. In a retrieval pipeline, every chunk you pass in adds input tokens, and fewer tokens to process means a faster response. Retrieval quality, though, depends on depth. Anthropic's Contextual Retrieval tests found that passing the top-20 chunks to the model beat the top-10 or top-5, and that reranking beat no reranking.
Reranking cuts both ways. On the model side it helps: it ensures only the most relevant chunks are passed on, which gives better responses and reduces cost and latency because the model is processing less information. On the pipeline side it has a runtime cost: it adds a step, and that step adds a small amount of latency even though the reranker scores all the chunks in parallel. The more chunks you rerank, the better the results tend to be and the higher the latency and cost of the rerank step itself. The guidance here matches the guidance for effort: there is no universal setting, so experiment on your own use case to find the balance. When justifying a retrieval configuration, state the latency you are paying for each added stage or added chunk and the accuracy gain you measured in return.
Checkpoint 4 of 5· Check yourself
A RAG-backed support bot must answer quickly, and the team is considering reranking 150 candidate chunks instead of 50. What is the documented position?
Scoring chunks in parallel does not remove the added step. Rerank depth is a tunable trade-off between performance and latency or cost.
“There is an inherent trade-off between reranking more chunks for better performance vs. reranking fewer for lower latency and cost.”Source: www.anthropic.com
Checkpoint 5 of 5· Exam question
A financial analytics application uses extended thinking to solve complex multi-step valuation problems. Response latency has become unacceptable for end users, but outputs must remain highly accurate given the complexity of the problems. Which adjustment best balances these constraints?
Correct answer: A — Keep the existing thinking budget but set display to "omitted" so text streaming begins immediately, since full thinking tokens still execute but their streaming overhead is removed rather than the reasoning itself being cut.
- A. Correct. Setting display to "omitted" eliminates thinking-token streaming overhead and lets text streaming begin immediately, improving perceived latency while preserving the full reasoning depth needed for accurate valuations.
- B. Incorrect. Disabling thinking entirely removes the step-by-step reasoning that complex multi-step valuation problems rely on for accuracy, trading away the quality the team explicitly needs to preserve.
- C. Incorrect. Forcing a uniformly small thinking budget across all requests would degrade accuracy on genuinely complex valuation problems that need more thorough reasoning, rather than only trimming the requests that can tolerate it.
- D. Incorrect. A larger thinking budget increases the tokens spent on reasoning and does not by itself reduce latency; it works against the team's goal of reducing unacceptable response times.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Fast mode is a lighter model that trades some intelligence for speed, and it reduces time to first token.Why is that wrong?
Fast mode uses the same model weights, so accuracy is unchanged. You pay premium pricing, and the speed gain is in output tokens per second, not TTFT.
Covered in Fast mode: paying for output speed, not intelligence
2.Lowering max_tokens is a good way to make an agent spend less.Why is that wrong?
The model can't see max_tokens, so cut-off turns are wasted but still billed. Keep it high and save money with effort and task budgets, which the model can see.
Covered in Agent runs: elapsed time, task budgets and max_tokens
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-latencyOfficial docs
“For speed-critical applications, Claude Haiku 4.5 offers the fastest response times while maintaining high intelligence”
↩︎ What 'latency' means, and the basic levers“This can significantly improve the perceived responsiveness of your application, as users can see the model's output in real time.”
↩︎ What 'latency' means, and the basic levers“The fewer tokens the model has to process and generate, the faster the response will be.”
↩︎ Retrieval depth and reranking: the same trade-off inside the pipeline“Time to first token (TTFT): This metric measures the time it takes for the model to generate the first token of the response”
↩︎ Checkpoint - 2.
“up to 2.5x higher output tokens per second from Claude Opus 5.5, Claude Opus 5, and Claude Opus 4.8 at premium pricing”
↩︎ Fast mode: paying for output speed, not intelligence“Prompt caching: Switching between fast and standard speed invalidates the prompt cache.”
↩︎ Fast mode: paying for output speed, not intelligence“Batch API: Fast mode is not available with the Batch API.”
↩︎ Fast mode: paying for output speed, not intelligence“Same model weights and behavior (not a different model)”
↩︎ Exam trap 1“Fast mode runs the same model with a faster inference configuration. There is no change to intelligence or capabilities.”
↩︎ Prediction“Speed benefits are focused on output tokens per second (OTPS), not time to first token (TTFT)”
↩︎ Checkpoint - 3.https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligenceOfficial docs
“runs took 33% to 69% less time at a 28% to 54% lower cost per task, with scores up to 1.9 points lower”
↩︎ Agent runs: elapsed time, task budgets and max_tokens“Set max_tokens to 64,000 for agentic work, or to 128,000, the maximum, when a single cut-off attempt is costly”
↩︎ Agent runs: elapsed time, task budgets and max_tokens“Task budgets are in beta (beta header task-budgets-2026-03-13) on the most recent models”
↩︎ Agent runs: elapsed time, task budgets and max_tokens“The budget is advisory, steering the model rather than stopping it, so verify adherence on your workload.”
↩︎ Agent runs: elapsed time, task budgets and max_tokens“Budgets below the current 20,000-token floor are rejected”
↩︎ Agent runs: elapsed time, task budgets and max_tokens“A task budget saves money, because the model sees it.”
↩︎ Exam trap 2“max_tokens caps a single response, invisibly to the model, so lowering it does not make the model economize.”
↩︎ Checkpoint - 4.
“Thinking counts toward max_tokens even when the thinking content isn't returned.”
↩︎ Agent runs: elapsed time, task budgets and max_tokens - 5.https://www.anthropic.com/engineering/contextual-retrievalSecondary source
“Reranking provides better responses and reduces cost and latency because the model is processing less information.”
↩︎ Retrieval depth and reranking: the same trade-off inside the pipeline“it inevitably adds a small amount of latency, even though the reranker scores all the chunks in parallel”
↩︎ Retrieval depth and reranking: the same trade-off inside the pipeline“Passing the top-20 chunks to the model is more effective than just the top-10 or top-5”
↩︎ Retrieval depth and reranking: the same trade-off inside the pipeline“We recommend experimenting with different settings on your specific use case to find the right balance.”
↩︎ Retrieval depth and reranking: the same trade-off inside the pipeline“There is an inherent trade-off between reranking more chunks for better performance vs. reranking fewer for lower latency and cost.”
↩︎ Checkpoint