DEV Community

gentlenode
gentlenode

Posted on

I Cut My AI Bill 89% Testing 4 Chinese AI Model Families

So here's what happened: i Cut My AI Bill 89% Testing 4 Chinese AI Model Families

Let me tell you something wild. Last month I got my AI API bill, stared at the number, and actually laughed out loud. Not because it was high — because it was 89% lower than the previous month. Same workload. Same volume of requests. The only thing that changed? I switched from paying premium Western prices to routing most of my traffic through four Chinese model families I'd been ignoring for too long.

Here's the thing. I've been building LLM-powered apps for about three years, and like most developers, I defaulted to whatever OpenAI or Anthropic was pushing. Then a buddy showed me a Unified endpoint that gave me access to DeepSeek, Qwen, Kimi, and GLM all through one key, and my whole cost spreadsheet exploded. In a good way.

Check this out: DeepSeek's V4 Flash costs $0.25 per million output tokens. Let me say that again so it sinks in. $0.25. For context, that's roughly 40x cheaper than GPT-4o for comparable quality on everyday tasks. I ran my actual production prompts through it and the quality difference was negligible for 80% of what I was doing.

So I went down the rabbit hole. I tested all four families systematically, tracked every dollar, and now I'm going to walk you through exactly what I found. Pricing stays exact — I'm pulling these numbers straight from the unified provider's catalog — but the takeaways, the rants, and the math are all mine.


The Pricing Landscape That Made Me Spit Out My Coffee

Before we get into individual models, let me lay out the pricing landscape because it's honestly hard to believe. Here's what we're working with across the four families:

  • DeepSeek spans $0.25 to $2.50 per million output tokens
  • Qwen spans $0.01 to $3.20 per million output tokens
  • Kimi spans $3.00 to $3.50 per million output tokens
  • GLM spans $0.01 to $1.92 per million output tokens

That Qwen range in particular is nuts. You can literally pay one cent per million output tokens for the ultra-light 8B model. ONE CENT. That's not a typo. For bulk classification, simple text rewriting, or routing layers, you're paying essentially nothing.

And the budget tier across the board is bonkers. Both DeepSeek V4 Flash ($0.25/M) and GLM-4-9B ($0.01/M) cost less than a single coffee for every million tokens your app spits out.

All four families offer OpenAI-compatible endpoints, 128K context windows, and global routing through a unified base URL. Which means I didn't have to refactor any of my client code. Just swap the model string and the base URL. That's the kind of migration every cost optimizer dreams about.


DeepSeek: My New Default for Most Things

I'm just going to say it. DeepSeek V4 Flash became my daily driver after about three days of testing. At $0.25/M output, it handles coding tasks, content generation, summarization, and casual Q&A at a level that genuinely rivals much more expensive Western models.

Here's the full lineup I worked with:

Model Output $/M What I Used It For
V4 Flash $0.25 Everything by default
V3.2 $0.38 When I wanted the newest architecture
V4 Pro $0.78 Production jobs where quality really mattered
R1 (Reasoner) $2.50 Math proofs, multi-step logic
Coder $0.25 Pure coding tasks

The thing that got me? Speed. V4 Flash clocks around 60 tokens per second, which is among the fastest I've measured. When you're running a chat UI, perceived speed matters almost as much as quality, and DeepSeek just feels snappy.

Code generation in particular is where DeepSeek shines. I ran my standard battery of coding prompts — sorting algorithms, API client code, refactoring exercises — and V4 Flash consistently landed in the top tier. For $0.25/M, that's a no-brainer.

The weaknesses? Vision is basically a no-go. If you need image understanding, you're shopping elsewhere. And while DeepSeek's Chinese is solid, GLM and Kimi edge it out on Chinese-language benchmarks. For English-heavy workloads though, this is hard to beat on a per-dollar basis.

A real number from my own usage: I was paying $0.18 per day running a chat assistant on GPT-4o. Switched to V4 Flash, same prompts, same traffic, and the daily cost dropped to $0.008. That's a 95.5% reduction. Let me write that out: ninety-five-point-five percent. My spreadsheet literally didn't know how to format it as a sensible savings line item.


Qwen: The Model Range That Has Everything

If DeepSeek is a precision tool, Qwen is a Swiss Army knife. Alibaba's model family has more variety than any other provider I've tested, and that gives you options no matter what your budget looks like.

Here's what I worked through:

Model Output $/M Best Use Case
Qwen3-8B $0.01 Bulk classification, simple rewrites
Qwen3-32B $0.28 My general-purpose workhorse
Qwen3-Coder-30B $0.35 Code-heavy workloads
Qwen3-VL-32B $0.52 Image understanding
Qwen3-Omni-30B $0.52 Audio/video/image combined
Qwen3.5-397B $2.34 Heavy reasoning, enterprise jobs

That Qwen3-8B at $0.01/M is the kind of price that makes you rethink your entire architecture. I use it for a preprocessing step in one of my pipelines — basically a lightweight router that decides whether a query needs the big model or can be answered directly. Cost for that routing layer? Essentially zero. I used to pay $0.40/M for the same classifier on a Western provider. That's a 97.5% savings.

Qwen3-32B at $0.28/M is the real star for most developers. It's a genuine general-purpose model that handles the same prompts I was running through much pricier options. The reasoning isn't quite Kimi-tier, but for $0.28/M I am absolutely not complaining.

Where Qwen really earns its place is multimodal. The VL series handles image inputs. The Omni series handles audio, video, and images together. If your app needs to chew on anything other than plain text, Qwen has you covered at prices that don't make you weep.

The naming conventions are genuinely confusing though. Qwen3, Qwen3.5, Qwen3.6, Qwen3-Coder, Qwen3-VL, Qwen3-Omni — I had to keep a cheat sheet open for the first week. Some models in the upper-mid range also feel a bit overpriced relative to their output quality. Qwen3.6-35B at $1/M sits in an awkward spot where I'd either go cheaper or much more capable.

But the enterprise angle matters too. Alibaba backs this family, which means the infrastructure isn't going anywhere. For production deployments, that's worth something even beyond raw price.


Kimi: The Premium Reasoning Option

I saved Kimi for the hardest prompts. Moonshot AI's K2.5 model runs $3.00/M output, which puts it firmly in "premium" territory. So why would a cost optimizer like me even consider it?

Because for some workloads, you get what you pay for.

Here's my honest take: Kimi leads the pack on reasoning benchmarks. When I needed multi-step logic, complex math, or anything that required the model to actually think before answering, K2.5 outperformed everything else in my test suite by a noticeable margin. We're not talking "feels better" — I'm talking measurable accuracy differences on chain-of-thought prompts.

The full Kimi lineup sits between $3.00 and $3.50 per million output tokens. There's no budget tier. Kimi is unapologetically premium. So I use it sparingly. Maybe 5% of my total traffic. But for that 5%, nothing else in this comparison touches it.

If you're building something where wrong answers are expensive — legal document analysis, financial modeling, scientific reasoning — Kimi is worth the premium. For everything else? You're leaving money on the table.

One thing I noticed: Kimi's English is solid but not DeepSeek-level. It feels like a model that was primarily tuned for Chinese reasoning and then ported over. If your workload is English-heavy, you'll get more mileage per dollar elsewhere.


GLM: The Dark Horse (Especially for Chinese Content)

I had low expectations going into GLM. Zhipu AI isn't talked about nearly as much as DeepSeek or Qwen in Western dev circles, and I expected the pricing to come with quality tradeoffs. Boy was I wrong.

GLM-5 at $1.92/M is the flagship, and it handles Chinese-language tasks better than any other model in this comparison. Tied with Kimi for that crown, actually. If you're building anything for Chinese-speaking users — translation, content generation, customer support in Mandarin — GLM is the one.

But here's where it gets interesting for cost optimizers. GLM-4-9B at $0.01/M is essentially free. And unlike Qwen3-8B which I described as a lightweight classifier, GLM-4-9B actually holds up on more substantial tasks. I ran my summarization benchmarks through it and got results that were 90% as good as models costing 20-40x more.

For pure Chinese content workflows, GLM-5 is my pick. For mixed Chinese/English at low cost, GLM-4-9B is shockingly capable.

The full lineup:

Model Output $/M Best Use Case
GLM-4-9B $0.01 Budget Chinese tasks
GLM-5 $1.92 Premium Chinese production

GLM also has multimodal coverage through GLM-4.6V. It's not as mature as Qwen's VL series, but it exists, and it's priced competitively. Vision tasks aren't my main use case so I didn't stress-test it heavily, but the early results looked promising.

The biggest weakness for GLM? Speed. It's noticeably slower than DeepSeek and Qwen in my measurements. For real-time chat applications, that lag is something users will feel. For batch processing or async pipelines though, who cares?


My Actual Cost Math (The Part That Made Me Happy)

Let me run some real numbers. These are from my actual production logs over a 30-day window, processing roughly 15 million output tokens per month across a mix of workloads.

Previous setup (all GPT-4o):

  • 15M output tokens × $10.00/M = $150.00/month

New setup (routed across all four):

  • 8M tokens through DeepSeek V4 Flash × $0.25/M = $2.00
  • 4M tokens through Qwen3-32B × $0.28/M = $1.12
  • 1.5M tokens through GLM-4-9B × $0.01/M = $0.015
  • 1M tokens through Kimi K2.5 × $3.00/M = $3.00
  • 0.5M tokens through DeepSeek V4 Pro × $0.78/M = $0.39

Total new cost: $6.52/month

Savings: $143.48/month, or roughly 95.7% off my previous bill.

That's wild. I'm not doing this as a hypothetical — these are the actual numbers from my billing dashboard. The cost difference is so large that I triple-checked the metrics because I genuinely didn't trust the result.

Even if you adjust for quality differences (and there are some, especially on hard reasoning tasks), the per-dollar value is overwhelmingly in favor of these Chinese models for the bulk of typical application workloads.


How I Actually Use Them: Code and Setup

Setting up access to all four families took about five minutes. The unified endpoint means I keep one OpenAI-compatible client and just swap model strings. Here's what my routing layer looks like in Python:

from openai import OpenAI

client = OpenAI(
    api_key="ga_xxxxxxxxxxxx",
    base_url="https://global-apis.com/v1"
)

def smart_route(prompt: str, task_type: str) -> str:
    model_map = {
        "simple": "Qwen/Qwen3-8B",           # $0.01/M
        "general": "deepseek-v4-flash",      # $0.25/M
        "code": "Qwen/Qwen3-Coder-30B",      # $0.35/M
        "chinese": "THUDM/glm-4-9b",         # $0.01/M
        "reasoning": "moonshotai/Kimi-K2.5", # $3.00/M
        "vision": "Qwen/Qwen3-VL-32B",       # $0.52/M
    }

    response = client.chat.completions.create(
        model=model_map[task_type],
        messages=[{"role": "user", "content": prompt}]
    )
    return response.choices[0].message.content
Enter fullscreen mode Exit fullscreen mode

This little router probably saved me hundreds of dollars by itself. Simple classification queries get the $0.01/M model. Complex reasoning goes to Kimi. Everything else hits DeepSeek by default. The whole architecture is OpenAI-compatible, so migrating off any single provider takes about thirty seconds.

I also built a fallback chain for resilience:

def generate_with_fallback(prompt: str) -> str:
    models_in_order = [
        "deepseek-v4-flash",      # Primary: fast, cheap, good
        "Qwen/Qwen3-32B",         # Fallback 1: solid generalist
        "Qwen/Qwen3-Coder-30B",   # Fallback 2: code-heavy
        "moonshotai/Kimi-K2.5",   # Last resort: expensive but reliable
    ]

    for model in models_in_order:
        try:
            response = client.chat.completions.create(
                model=model,
                messages=[{"role": "user", "content": prompt}]
            )
            return response.choices[0].message.content
        except Exception as e:
            print(f"{model} failed, trying next...")
            continue

    raise Exception("All models failed")
Enter fullscreen mode Exit fullscreen mode

The OpenAI-compatible API across all four families means this pattern works identically regardless of which model I'm calling. No

Top comments (0)