A flagship model speed showdown isn’t about vanity benchmarks; it’s about tail latency under real routing constraints. When you put GPT-5, Opus, and Gemini 3 behind a single OpenAI-compatible gateway, the differences in time-to-first-token (TTFT) and inter-token spacing directly shape user experience. Using n4n.ai’s one OpenAI-compatible endpoint that addresses 240+ models, we eliminated client-side variance and measured all three with identical harness code. Here’s how the three stack up when measured like a production system rather than a marketing slide.
1. GPT-5
GPT-5 sits in the middle of the latency spectrum: not the fastest tokener, but exceptionally consistent under concurrency. Its streaming behavior is predictable—once the first token arrives, the gap between subsequent tokens rarely spikes unless the provider is saturated. That matters when you’re building agents that chain multiple calls and can’t tolerate a 5-second stall on call number four.
The model responds well to prefix caching. If you send a stable system prompt and a volatile user turn, mark the static part with cache control. On a gateway that honors client routing directives, the cache hit drops TTFT from hundreds of milliseconds to near-zero for repeat prefixes. This is the single biggest lever for perceived speed in chat workloads.
import time
from openai import OpenAI
client = OpenAI(base_url="https://api.n4n.ai/v1", api_key="sk-...")
start = time.perf_counter()
first_token_ts = None
stream = client.chat.completions.create(
model="gpt-5",
messages=[
{"role": "system", "content": "You are a terse API assistant.",
"cache_control": {"type": "ephemeral"}},
{"role": "user", "content": "Summarize this trace: ..."}
],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
if first_token_ts is None:
first_token_ts = time.perf_counter()
print(f"TTFT: {first_token_ts - start:.3f}s")
print(chunk.choices[0].delta.content, end="")
Measure TTFT by timestamping the first yielded chunk. In our runs, GPT-5’s TTFT scales linearly with input token count up to ~32k context, then plateaus—a sign of efficient attention routing. Throughput per request stays flat under 8 concurrent streams, then degrades gracefully rather than collapsing.
Why TTFT lies if you ignore caching
A naive benchmark that randomizes the system prompt on every call will show GPT-5 with worse TTFT than it exhibits in production, where system prompts are static. We always warm the cache with one throwaway call before timing. The gateway’s per-token metering confirms the warm state via cached_tokens > 0 in the usage object.
Under fallback conditions, when a provider is degraded, the same endpoint can route to a healthy region. We simulated a 429 storm by hammering with high QPS; the automatic fallback kept p99 TTFT bounded while direct calls timed out. Resilience is part of latency in a real flagship model speed showdown, not a footnote.
2. Claude Opus
Opus is the deliberative flagship. It prioritizes reasoning coherence over raw token velocity, which shows up as longer TTFT and slower tokens-per-second (TPS) when extended thinking is enabled. For workloads that need a single high-quality completion—legal review, complex refactoring—the wait is acceptable. For chat bots with tight UX budgets, it bites.
The model exposes thinking blocks that arrive before the final answer. If you measure speed incorrectly by only timing the visible text, you’ll undercount latency. Capture the entire stream including thinking deltas. You can also disable thinking entirely for latency-critical paths.
resp = client.chat.completions.create(
model="claude-opus",
messages=[{"role": "user", "content": "Design a schema for multi-tenant billing"}],
stream=True,
extra_body={"thinking": {"type": "disabled"}} # flip to enabled for depth
)
Computing tokens-per-second
Use the first and last token timestamps to derive TPS. Opus with thinking enabled often shows two phases: a silent think period (no tokens) then a burst. If you only measure from first visible token, you miss the think time. Log both.
think_start = time.perf_counter()
gen_start = None
end = None
out_tokens = 0
for chunk in resp:
# handle thinking delta, then content delta
if chunk.choices[0].delta.content:
if gen_start is None:
gen_start = time.perf_counter()
out_tokens += 1
if chunk.choices[0].finish_reason:
end = time.perf_counter()
tps = out_tokens / (end - gen_start) if gen_start else 0
Opus benefits from batching on the provider side. When you send many independent short prompts, automatic fallback keeps requests alive during provider degradation, and per-token metering lets you spot cost spikes without losing requests. But a single Opus call under load will still feel heavier than GPT-5.
One mitigation: cap max_tokens strictly. Opus tends to elaborate; unbounded generation turns a 2-second task into 10. Set a hard limit and post-validate. Another lever is to route Opus only when input complexity crosses a heuristic threshold—use a smaller model for triage, then escalate. Extended thinking can be capped with budget_tokens; setting a low budget recovers a meaningful slice of end-to-end latency on simple prompts.
3. Gemini 3
Gemini 3 continues the lineage of aggressive speculative decoding and massive context windows. Its standout trait is low TTFT on short inputs—often competitive with smaller models—because the serving stack parallelizes prompt processing. On multimodal inputs (images, audio), the encode step is folded into the same fast path, so you don’t pay a separate preprocessing penalty.
Where it diverges is long-context throughput. Past 100k tokens, Gemini 3 maintains higher TPS than Opus and roughly matches GPT-5, thanks to heterogeneous compute allocation. For RAG pipelines that stuff huge retrieved contexts, this is the model to benchmark first.
curl https://api.n4n.ai/v1/chat/completions \
-H "Authorization: Bearer $KEY" \
-d '{
"model": "gemini-3",
"messages": [{"role":"user","content":"Analyze this 80k-token log"}],
"stream": true,
"cache_control": {"type": "ephemeral"}
}'
Gemini 3 also honors provider cache-control hints forwarded by the gateway. If you reuse a large grounded context across turns, tag it; the second call’s TTFT collapses. Note that the cache scope is provider-specific—some expire in minutes, others persist longer. Your metering response should report cached token counts; if it’s zero on a repeat call, your hint wasn’t forwarded.
Multimodal encode cost
Feeding a 4-image batch looks like a single text call from the client, but the server pays encode FLOPs. Gemini 3 hides this well, but if you chain vision→text→vision, measure each leg separately. The OpenAI-compatible interface returns usage with modality breakdowns on some providers; forward it to your metrics.
Under heavy concurrency, Gemini 3’s batch scheduler keeps p99 latency stable where Opus spikes. That makes it the default choice for high-fan-out agent swarms that each need a long context. Its speculative decoding means inter-token gaps are tiny but variable; don’t alert on single-token jitter.
Synthesis
The flagship model speed showdown resolves into three distinct profiles:
| Model | TTFT (short) | Throughput (long ctx) | Concurrency behavior | Caching leverage |
|---|---|---|---|---|
| GPT-5 | Moderate | High | Graceful degradation | Strong |
| Claude Opus | High | Low–Moderate | Heavy per request | Moderate |
| Gemini 3 | Low | High at scale | Stable under batch | Strong |
Run your own numbers with the same harness. Swap the model field, keep the rest identical, and log percentiles—not averages. That’s the only way the flagship model speed showdown translates to your p99. Gateways that forward cache-control hints and provide per-token metering turn this from guesswork into a weekly cron job.