Skip to content
GitHub

Product

Benchmarks Partners

Resources

Docs Blog

OpenAI AI Gateway Benchmarks

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 by Namespace · 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
OpenRouter91.2470ms357ms720.79ms0.92ms3.33ms100%
OpenAI (Direct)Baseline90.5383ms344ms750.83ms0.96ms2.71ms100%
Pydantic AI Gateway90.1481ms543ms670.79ms1.60ms4.51ms100%
Cloudflare AI Gateway89.9476ms382ms690.78ms0.88ms5.14ms100%
Vercel AI Gateway89.6521ms441ms590.85ms0.81ms5.17ms100%
Neon89.3698ms503ms590.79ms19.51ms40.12ms100%
Concentrate AI87.0827ms627ms510.75ms0.84ms5.22ms100%
LLMgateway85.81027ms996ms570.73ms1.54ms5.11ms100%
ngrok AI Gateway84.81364ms851ms410.74ms19.28ms21.48ms100%

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