DEV Community

Alex Chen
Alex Chen

Posted on

I Tested 15 AI APIs for Speed - Here's What I Found

I Tested 15 AI APIs for Speed - Here's What I Found

I've been obsessed with one question lately: how fast can AI APIs actually be? Not in a marketing brochure sense, but in the real, don't-make-me-wait sense. So I rolled up my sleeves, fired up a terminal, and started hitting endpoints. I ended up running 150 speed tests across 15 different models. Let me walk you through what I learned, because some of the results genuinely surprised me.

Why I Almost Quit My Last Project Over Latency

I'll be honest with you - my motivation here isn't academic. A few months ago I was building a customer support chatbot, and the difference between a snappy reply and a sluggish one was the difference between a user finishing the conversation and bouncing off the page. Two seconds feels like forever when you're staring at a spinning cursor.

That experience got me thinking. With dozens of LLMs available now, which one should I actually pick when speed is the constraint? Everyone's talking about quality benchmarks, but the second-dimension story - the actual user-perceived latency - gets way less attention. So I decided to generate my own data, and I'm sharing it here so you don't have to.

Here's how I approached it.

My Setup: Boring But Honest

Before showing you the results, let me tell you exactly what I tested and how. I wanted this to be reproducible, so I kept things simple.

I picked the prompt "Explain recursion in 200 words" because it forces a model to do real work - explanation, structure, a bit of pedagogy - without being so heavy it triggers every chain-of-thought pattern in existence. That mirrors the kind of "moderate difficulty" task that comes up in production a lot.

I streamed every response. I asked for about 150 output tokens. I ran each test 10 times and averaged the numbers. I tested from two regions: US East (Ohio) and Asia (Singapore). And I made all my calls through Global API's unified endpoint at https://global-apis.com/v1, which is the cleanest way I've found to avoid juggling separate API keys for every provider.

Oh, and one note: I did this back on May 20, 2026. Numbers from this space move fast, so keep the date in mind.

The Speed Rankings (My Version of the Throne Room)

Okay, let me show you the main event. I sorted every model by tokens per second, because that's what I care about most when a user is watching a response stream in. Here's the full table from fastest to slowest:

Rank Model TTFT (ms) Tokens/sec Provider $/M Output
🥇 Step-3.5-Flash 120 80 StepFun $0.15
🥈 DeepSeek V4 Flash 180 60 DeepSeek $0.25
🥉 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

A few things I want to call out:

First, TTFT (Time to First Token) and tokens/sec measure different things. TTFT is the wait before you see anything. Tokens/sec is how fast the rest flows. Both matter, but they matter in different products.

Second, the slowest models in the list - DeepSeek-R1 and Kimi K2.5 - aren't slow because they're bad. They're slow because they're reasoning models, spending real time thinking before they emit a single visible token. That's the trade-off you make for higher quality output. I'll come back to that.

The Cheap Seats Are Wild

Let me show you what happens when I slice the data by price, because this is where things get genuinely fun.

In the ultra-budget tier (under $0.15 per million output tokens), I had two contenders: Qwen3-8B at $0.01/M and Step-3.5-Flash at $0.15/M. Qwen3-8B is genuinely absurd in value. Seventy tokens per second at essentially free is the kind of number that makes you double-check your keyboard. Step-3.5-Flash is the speed champion at 80 tok/s, and it's still cheap enough to not worry about.

Now, "cheap" doesn't always mean "fast" - I should be clear about that. For tasks where you just need a quick translation, a quick reformat, quick classification, the ultra-budget tier is unbeatable. Don't waste a $3 model on things you can do for a $0.01 model.

In the budget tier ($0.15-$0.30/M), I got three real options: DeepSeek V4 Flash at 60 tok/s and $0.25/M, Hunyuan-TurboS at 55 tok/s and $0.28/M, and Qwen3-32B at 45 tok/s and $0.28/M. This is the sweet spot in my opinion. DeepSeek V4 Flash sits right in the middle of the pack on speed but the quality is closer to GPT-4o-class. If I had to pick a default for new projects, this is what I'd pick.

The mid-range ($0.30-$0.80/M) is where I saw the speed start to drop. Doubao-Seed-Lite at 50 tok/s and $0.40/M was the fastest here, while DeepSeek V4 Pro at 30 tok/s and $0.78/M was the slowest. Generally, models in this tier are bigger, so they take a bit longer per token. You're paying for quality, and speed is the trade.

Then there's the premium tier ($0.80+/M). MiniMax M2.5 at 28 tok/s and $1.15/M, GLM-5 at 25 tok/s and $1.92/M, and Kimi K2.5 at 20 tok/s and $3.00/M. These are the "I need this to be correct" models. Use them when every answer matters more than the wait.

Picking by Speed Alone: A Different Ordering

Sorting by speed first, ignoring quality, my personal top 3 is:

  1. Step-3.5-Flash at 80 tok/s with a 120ms TTFT
  2. Qwen3-8B at 70 tok/s with a 150ms TTFT
  3. DeepSeek V4 Flash at 60 tok/s with a 180ms TTFT

If your product is real-time - autocomplete, voice agent, live chat - these are the ones to think about first. The first two are absolute speedsters but they're small. DeepSeek V4 Flash is the speed/quality Goldilocks pick for me.

Where You Run From Matters

Here's something I didn't fully appreciate until I tested it from two regions. Network latency is real and it's not symmetric.

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

The pattern is clear: Asian models (Qwen, GLM, Kimi) had 16-20% lower latency when I tested from Singapore. Makes sense - their servers are over there. DeepSeek felt well-distributed globally, with only 30ms difference between regions.

The takeaway: if your users are in Asia and you're serving them from a US data center, you're leaving 80-120ms on the table for free. Pick a region-aware endpoint. Global API actually handles this for you across regions, which is one of the reasons I went through them.

What These Numbers Actually Mean to Users

Raw milliseconds are kind of abstract. Let me ground this in what users actually feel, because I think this is the most useful part of the whole exercise.

TTFT What users feel
Under 200ms Instant - excellent UX
200-400ms Fast - acceptable
400-800ms Noticeable delay - some users frustrated
800ms+ Slow - users leave

For interactive chat, I'd personally aim for TTFT under 400ms. That keeps DeepSeek V4 Flash (180ms), Qwen3-8B (150ms), Step-3.5-Flash (120ms), Doubao-Seed-Lite (220ms), Hunyuan-TurboS (200ms), and Qwen3-32B (250ms) all on the table. Anything slower and you're asking users to be patient, which is a thing users are not great at.

For batch processing, document generation, async workflows, latency matters less. The 1200ms TTFT of Qwen3.5-397B is fine when you're processing a thousand documents overnight. Different problem, different tool.

Let Me Show You the Code

Here's the actual Python snippet I used to run these benchmarks. It's dead simple - just an OpenAI-compatible client pointed at Global API's endpoint:


python
import time
import httpx
from statistics import mean

API_URL = "https://global-apis.com/v1"
API_KEY = "your-global-api-key"

def benchmark_model(model_name, runs=10):
    ttft_list = []
    tps_list = []

    for _ in range(runs):
        start = time.perf_counter()
        first_token_time = None
        token_count = 0

        with httpx.stream(
            "POST",
            f"{API_URL}/chat/completions",
            headers={"Authorization": f"Bearer {
Enter fullscreen mode Exit fullscreen mode

Top comments (0)