All posts
· 5 min read

How to Reduce LLM API Latency: A Practical Checklist

A developer's checklist for cutting LLM API latency: stream first, cache prompts, right-size context, pick the fastest model tier, and design for the P95 tail.

Latency is the tax every LLM feature pays. You can ship the smartest agent in the world, but if the first token takes four seconds to appear, users decide it's broken before they read a word of it. The good news: most latency problems are structural, not fundamental. You can fix them without switching providers or rewriting your product.

This is a practical, ordered checklist for reducing LLM API latency in production — from the changes that pay off immediately to the ones that need real measurement first.

Note on data: Our live monitoring API was unreachable from our build environment this week, so the specific model figures below are drawn from our most recent committed snapshot (April 2026) and are clearly labeled as historical. For current numbers across all 15 models we track, check the live dashboard.

First, Know Which Latency You're Fighting

"Latency" isn't one number. Before you optimize, split it into the two that actually drive user experience:

  • TTFT (time to first token) — the wait before anything appears. This governs perceived responsiveness.
  • Throughput / inter-token latency — how fast the rest of the response streams once it starts. This governs how long a full answer takes.

They respond to completely different fixes. Optimizing throughput won't help a chat UI that feels slow to start, and optimizing TTFT won't speed up a long batch generation. Decades of HCI research, summarized in Nielsen Norman Group's three response-time limits, give the targets: ~1s still feels responsive, ~10s loses attention. Aim your effort at whichever metric your surface actually depends on.

The Checklist

1. Stream the response

If you're not streaming, start here. Streaming doesn't reduce total generation time — it just delivers tokens as they're produced, so the user starts reading immediately instead of staring at a spinner. For any interactive surface, a fast first token beats a fast full response almost every time. This is the single highest-leverage change for perceived speed, and it's usually a one-line flag on the API call.

2. Cache repeated prompt prefixes

If your requests share a large, stable prefix — a system prompt, tool definitions, a retrieved document, conversation history — prompt caching lets the provider skip recomputing it. Per Anthropic's prompt caching docs, caching can deliver meaningful TTFT and cost improvements for repetitive, large-context tasks; the major providers all offer some form of it now. The win scales with how much context you reuse, so structure your prompt with the stable content first and the variable content last.

3. Right-size the context you send

Every token in the prompt is a token the model has to read before it can emit the first one of the response. Bloated context — an entire chat history, ten retrieved chunks when three would do, a verbose system prompt — directly inflates TTFT. Trim aggressively: cap retrieval, summarize old turns, and drop instructions the model already follows reliably. Smaller input is the cheapest latency win there is.

4. Pick the right model tier for the job

Not every call needs a flagship. Fast-tier models exist precisely for latency-sensitive work, and the gap is large. In our April 2026 snapshot, fast-tier models were landing first tokens in the 400–600ms range while reasoning models stretched past 6,000ms — roughly a 14x spread across the models we track. Route classification, extraction, and routing decisions to a fast model, and reserve the flagship for the calls that genuinely need it. If first-token speed is the priority, compare the fast options head-to-head, like Claude Haiku 4.5 vs GPT-4o Mini, rather than defaulting to whatever your app already uses.

5. Be deliberate about reasoning models

Reasoning models "think" before they stream, which is exactly why they post the slowest TTFT of anything we monitor. That's a feature for hard problems and a liability for interactive ones. If you're using a reasoning model inside a latency-sensitive loop, ask whether the task actually needs it — and if it does, set user expectations with a visible "thinking" state rather than an empty box.

6. Colocate and reuse connections

Physical distance and connection setup are latency you can't prompt your way out of. Run your inference calls from a region close to the provider's endpoint, reuse HTTP connections instead of opening a new TLS handshake per request, and keep the client warm. These are small individual wins that compound in agent chains where every hop counts.

7. Design for the tail, then add fallbacks

This is the step teams skip, and it's the one that determines whether your app feels reliable. A good average TTFT hides an ugly tail: our monitoring routinely shows the gap between a typical request (P50) and a worst-case one (P99) running 5–20x for the same model — see what average TTFT doesn't tell you for the breakdown. Set timeouts at or above P99, not the average, and pair them with a retry or a faster fallback model so a single slow request degrades gracefully instead of failing.

Measure Before and After

None of this is worth doing blind. Establish a baseline P95 TTFT for your actual workload, change one thing, and re-measure — provider-side performance shifts with time of day and region, so a fix that looks like a win at 3am might not hold at peak. For target ranges by use case, see what's a good TTFT for a production app.

Key Takeaways

  • Split latency into TTFT and throughput first; they need different fixes.
  • Stream everything interactive — it's the biggest perceived-speed win for the least effort.
  • Cache stable prefixes and trim context to cut TTFT at the source.
  • Match the model tier to the task; the fast/reasoning spread is roughly 14x.
  • Design against P95/P99 with timeouts and fallbacks, not the average.

Track real-time TTFT, latency, and throughput across the 15 models we monitor — pinged every 10 minutes — at ModelStats.ai.

See the live data

Every model tested every 10 minutes — compare them on the live dashboard.

Browse all models