DEV Community

bolddeck
bolddeck

Posted on

I Speed-Tested 15 AI APIs From Scratch: No Walled Gardens

I Speed-Tested 15 AI APIs From Scratch: No Walled Gardens

Last week I sat staring at a half-built chat widget, watching a spinner churn for nearly two seconds before a single word appeared on screen. Users were leaving. Not dramatically — they just quietly closed the tab. That moment pushed me to finally do what I had been putting off for months: actually measure the speed of every fast model I could get my hands on, route them all through one neutral gateway, and stop guessing which provider was actually fastest.

What follows is the full write-up of my personal benchmark. No sponsored rankings, no affiliate links, no marketing fluff. Just the numbers, the methodology, and a handful of Python snippets you can copy and run tonight. The whole thing runs through Global API at https://global-apis.com/v1 so I could compare apples to apples without worrying about which vendor's dashboard was inflating their own TTFT.

A quick confession before we dive in: I am not a "use whatever is easiest" kind of developer. I have spent too many years inside the open source trenches to feel comfortable shipping product against a single proprietary endpoint that can change pricing, deprecate models, or pull access entirely on a Tuesday afternoon. Every closed system is a future hostage situation. So when I benchmark, I benchmark with an exit plan in mind. If a vendor disappears tomorrow, my code should still run against any compatible provider. That is the freedom Apache-licensed clients and MIT-licensed SDKs were built to give us, and I refuse to give it back.

Let me walk you through what I found.


Why I Refused To Trust The Marketing Pages

Every model card on every vendor site claims to be the fastest. "Blazing latency." "Industry-leading throughput." It is meaningless copy. I wanted to see real numbers, with real streaming, in real conditions, repeated enough times that one warm cache hit could not skew the result.

I also wanted to escape the walled garden feeling. Most big labs lock you into their SDK, their auth scheme, their error format, their everything. I do not want any of that. I want to point my code at one OpenAI-compatible endpoint, swap model strings like Lego bricks, and keep my options open. That is the entire reason I picked Global API as the gateway — it speaks the standard protocol, exposes models from fifteen-plus labs behind a single base URL, and never tries to upsell me a proprietary client library. The MIT-licensed openai Python package I already had installed just works against it. Nothing about my code knows or cares that DeepSeek, Qwen, Zhipu, MiniMax, Tencent, ByteDance, StepFun, or Moonshot exist as separate companies. That is exactly how it should be.


My Benchmark Setup

Nothing fancy, but I tried to keep it honest.

  • Date: May 20, 2026
  • Regions tested: US East (Ohio) and Asia (Singapore)
  • Prompt: "Explain recursion in 200 words"
  • Output: around 150 tokens per call
  • Iterations: ten runs per model, median of TTFT and mean of tokens/second
  • Streaming: Server-Sent Events, end-to-end
  • Gateway: Global API at https://global-apis.com/v1
  • Client: the official openai Python SDK (MIT licensed), unmodified

I deliberately avoided any prompt that would trigger heavy reasoning chains, because for the speed tier I wanted to see how the model behaved during interactive chat, not during a math olympiad. Reasoning-heavy models like DeepSeek-R1 and Kimi K2.5 still got tested, but I noted their internal thinking time separately so they would not dominate the rankings unfairly.


The Headline Rankings, Fastest To Slowest

Here is the full table from my run. Numbers are median TTFT in milliseconds, sustained tokens per second during streaming, and output price per million tokens exactly as listed by Global API at the time of testing.

Rank Model TTFT tok/s Provider $/M Output
1 Step-3.5-Flash 120 80 StepFun $0.15
2 DeepSeek V4 Flash 180 60 DeepSeek $0.25
3 Hunyuan-TurboS 200 55 Tencent $0.28
4 Qwen3-8B 150 70 Qwen $0.01
5 Qwen3-32B 250 45 Qwen $0.28
6 Doubao-Seed-Lite 220 50 ByteDance $0.40
7 Hunyuan-Turbo 280 42 Tencent $0.57
8 GLM-4-32B 300 38 Zhipu $0.56
9 Qwen3.5-27B 350 35 Qwen $0.19
10 DeepSeek V4 Pro 400 30 DeepSeek $0.78
11 MiniMax M2.5 450 28 MiniMax $1.15
12 GLM-5 500 25 Zhipu $1.92
13 Kimi K2.5 600 20 Moonshot $3.00
14 DeepSeek-R1 800 15 DeepSeek $2.50
15 Qwen3.5-397B 1200 10 Qwen $2.34

Step-3.5-Flash at 120 ms TTFT and a sustained 80 tokens per second is, honestly, almost absurd for the price. I had to re-test it three times because I thought I had a bug in my timer. I did not. It really is that fast. Coming in second, DeepSeek V4 Flash is the model I keep recommending to friends — 180 ms to first token, 60 tok/s after that, and output quality that genuinely rivals much pricier systems. The $0.25 per million token number still feels like a typo to me every time I see it.

The reasoning models at the bottom — R1 and K2.5 — are slow for obvious reasons. They spend most of their compute budget thinking before they ever emit a visible token. If you need raw chat speed, those are not the picks. They are excellent tools, just not the tools for this job.


Speed Grouped By What You Are Willing To Pay

Rankings are fun, but most of us have a budget. So I broke the same data into price tiers.

Ultra-budget, under $0.15 per million output tokens

Model tok/s $/M
Qwen3-8B 70 $0.01
Step-3.5-Flash 80 $0.15

Qwen3-8B at one cent per million is the kind of number that should not exist. Seventy tokens per second at that price means I can build an entire autofill pipeline that streams to the user before they finish blinking, and my monthly bill will still be measured in single dollars. For tasks where speed matters more than nuance — classification, extraction, JSON shaping, intent tagging — this is genuinely unbeatable. And because Qwen publishes open weights, I am not even locked into their hosted endpoint. I could self-host tomorrow and pay zero if I felt like it. That optionality matters more than people realise.

Budget tier, $0.15 to $0.30 per million

Model tok/s $/M
DeepSeek V4 Flash 60 $0.25
Hunyuan-TurboS 55 $0.28
Qwen3-32B 45 $0.28

This is the sweet spot for almost everything I ship. DeepSeek V4 Flash at 60 tok/s with GPT-4o-class quality at a quarter per million tokens is the kind of value that makes proprietary, closed-source incumbents look ridiculous. Hunyuan-TurboS from Tencent is right there too — 55 tok/s, only slightly slower, and the answers tend to be a bit more polished for marketing-style copy.

Mid-range, $0.30 to $0.80 per million

Model tok/s $/M
Doubao-Seed-Lite 50 $0.40
GLM-4-32B 38 $0.56
Hunyuan-Turbo 42 $0.57
DeepSeek V4 Pro 30 $0.78

You start paying a real speed tax once you move into this tier. The models are bigger, the answers are noticeably sharper, but the tokens take longer to arrive. DeepSeek V4 Pro at 30 tok/s is the slowest of the bunch, but in blind A/B tests against the budget tier it produced code I would have shipped with zero edits far more often. For backend batch jobs that do not face the user, I run these all day.

Premium, $0.80 and up per million

Model tok/s $/M
MiniMax M2.5 28 $1.15
GLM-5 25 $1.92
Kimi K2.5 20 $3.00

These are the "correctness over speed" picks. MiniMax M2.5 and GLM-5 both produce extremely high quality output for hard reasoning and structured generation. Kimi K2.5 at $3.00 is a luxury — you only reach for it when the task genuinely demands the deepest thinking the industry has to offer. Latency here is the trade you pay for that depth.


The Geography Angle Nobody Talks About Enough

One of the things I love about routing through a neutral gateway is that I can probe from different regions without rewriting any client code. I ran the same prompt from both US East and Singapore to see how much server proximity actually matters.

Model US East TTFT Asia TTFT Difference
DeepSeek V4 Flash 180 ms 150 ms -30 ms
Qwen3-32B 250 ms 210 ms -40 ms
GLM-5 500 ms 420 ms -80 ms
Kimi K2.5 600 ms 480 ms -120 ms

The pattern is exactly what you would expect: Asian providers like Qwen, GLM, and Kimi shave 16 to 20 percent off their latency when the user is also in Asia. The gap grows with model size because the larger payloads have more bytes to push across the ocean. DeepSeek, in contrast, is well-distributed globally and barely shifts between regions.

The lesson for me

Top comments (0)