AI Gateway Benchmarks - OpenAI

Benchmark AI gateway latency and token throughput, measured against a direct-to-OpenAI baseline. Inspired by this benchmark from Ronny Badilla.

Powered byNamespace· 4 vCPU / 16GB RAM· Northern Virginia, US

Provider Leaderboard

"OpenAI (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.

Provider VarianceComposite Score

"OpenAI (Direct)" is a no-gateway control, not a competing gateway.
Delta vs. the OpenAI (Direct)'s composite score. Positive is better than baseline; negative is worse.

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
OpenRouter89.7502ms452ms641.05ms1.14ms4.17ms100%
Pydantic AI Gateway88.3768ms699ms541.30ms1.83ms4.95ms100%
Concentrate AI88.3856ms697ms481.13ms1.23ms6.17ms100%
Neon88.1896ms714ms481.19ms15.03ms32.28ms100%
OpenAI (Direct)Baseline88.0881ms643ms472.89ms1.25ms3.86ms100%
Cloudflare AI Gateway86.91098ms694ms482.41ms1.46ms7.76ms100%
ngrok AI Gateway86.8976ms668ms471.63ms14.44ms17.32ms100%
LLM API86.61226ms773ms441.29ms86.40ms87.71ms100%
Vercel AI Gateway86.2727ms663ms512.41ms5.92ms20.96ms100%
LLMgateway85.7989ms1461ms571.35ms1.86ms6.42ms100%

Want to see a gateway added?

Let us know on X

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 (GPT-5.4 Mini), 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.

This family's no-gateway control is a direct call to OpenAI's own API, not a competing participant — it isolates how much latency each gateway adds on top of the underlying model provider. See the other target-model families on the AI Gateway Benchmarks overview. 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%
PartnersLatitude