AI Gateway Performance Benchmark
AI Gateway Benchmarks
Benchmark AI gateway latency and token throughput, measured against a direct Anthropic baseline. Inspired by this benchmark from Ronny Badilla.
Powered byProvider Leaderboard
"Anthropic (Direct)" is a no-gateway control, not a competing gateway — it isolates how much latency each gateway adds on top of the underlying model provider.
Performance Over Time
Composite Score
Detailed Metrics
Provider | Score | Cold E2E (med) | Warm TTFT (med) | Tokens/sec (med) | DNS (med) | TCP (med) | TLS (med) | Success |
|---|---|---|---|---|---|---|---|---|
| Cloudflare AI Gateway | 90.0 | 657ms | 624ms | 88 | 0.90ms | 0.87ms | 5.88ms | 100% |
| Pydantic AI Gateway | 89.8 | 727ms | 583ms | 86 | 0.86ms | 1.64ms | 4.80ms | 100% |
| Anthropic (Direct)Baseline | 89.3 | 821ms | 521ms | 88 | 0.83ms | 1.08ms | 2.93ms | 100% |
| OpenRouter | 89.2 | 941ms | 785ms | 101 | 0.86ms | 1.26ms | 3.51ms | 100% |
| Vercel AI Gateway | 88.8 | 831ms | 739ms | 88 | 0.87ms | 5.66ms | 20.26ms | 100% |
| LLMgateway | 88.5 | 718ms | 602ms | 89 | 0.86ms | 1.46ms | 5.16ms | 100% |
Want to see a gateway added?
Methodology
Every run executes on a GitHub Actions runner hosted by Namespace, physically located in Northern Virginia, US. Since results are a property of the network they're measured from, treat rankings as relative to that vantage point rather than a universal number — see Limitations in the full methodology.
What We Measure
Every gateway is hit directly with the same prompt and model (Claude Haiku 4.5), addressed the way each API expects it to be addressed — no gateway is proxied through another. Each request is either cold (a brand-new TCP+TLS connection, opened from scratch) or warm (a second request reusing an already-open keep-alive connection).
Cold requests are broken into DNS, TCP, and TLS phases (real socket timestamps, not estimates), plus time to first response byte and first streamed token. Every request also records output tokens/sec and success/failure.
Anthropic (Direct) is a no-gateway control, not a competing participant — it isolates how much latency each gateway adds on top of the underlying model provider. Full methodology, including how "cold" and "warm" are defined and their limitations, is documented in the public benchmarks repo.
How We Score
The Composite Score combines cold end-to-end latency and warm time-to-first-token — the short-lived-process case and the steady-state case — with generation throughput, all multiplied by success rate.
- • Cold E2E median: 30%
- • Warm TTFT median: 30%
- • Cold E2E P95: 15%
- • Warm TTFT P95: 15%
- • Tokens/sec: 10%