DEV Community

jianjun Liu
jianjun Liu

Posted on • Originally published at tokenease.io

I Built a 6-Model AI SaaS in 48 Hours: The 2026 Stack

I Built a 6-Model AI SaaS in 48 Hours

TokenEase (https://tokenease.io) — one API key, 6 models, 95% cheaper than GPT-5. Here's the exact stack.

The Product

  • Kimi K3, DeepSeek V4, GLM-5.1, Qwen-Plus, Doubao Pro, K2.6
  • OpenAI-compatible endpoint
  • No Chinese phone required
  • $1 free credit

The Stack (Total Cost: $40/mo)

Layer Tool Cost
Backend Python Flask on Hetzner $5
Frontend Static HTML on Cloudflare Free
Database SQLite Free
Payments Paddle 5% + $0.50
Email Resend Free (3K/mo)
Domain tokenease.io $1/mo
AI API TokenEase (this is the loop) $0 startup

Total: $6/mo to run, $0 in AI costs until you have paying users.

Architecture

[Customer Code] 
    ↓
[TokenEase API] ← Single endpoint, OpenAI-compatible
    ↓
[Model Router] ← Selects best model per request
    ↓
[6 Chinese AI Providers] ← K3, DeepSeek, GLM, Qwen, Doubao, K2.6
    ↓
[Response back to customer]
Enter fullscreen mode Exit fullscreen mode

The killer insight: don't build AI infra, wrap it.

Code (Core 100 Lines)

# main.py
from flask import Flask, request, jsonify
import requests, time
import sqlite3

app = Flask(__name__)

# TokenEase config
TE_BASE = "https://api.tokenease.ai/v1"
TE_KEY = "tk_admin_key"

@app.route("/v1/chat/completions", methods=["POST"])
def chat():
    data = request.json
    user_key = request.headers.get("Authorization", "").replace("Bearer ", "")

    user = get_user(user_key)
    if not user:
        return jsonify({"error": "invalid key"}), 401

    r = requests.post(
        f"{TE_BASE}/chat/completions",
        headers={"Authorization": f"Bearer {TE_KEY}"},
        json=data,
        timeout=60
    )

    usage = r.json().get("usage", {})
    track_usage(user["id"], data["model"], usage.get("total_tokens", 0))

    return r.json(), r.status_code

def get_user(key):
    conn = sqlite3.connect("users.db")
    return conn.execute("SELECT * FROM users WHERE api_key=?", (key,)).fetchone()

def track_usage(user_id, model, tokens):
    conn = sqlite3.connect("users.db")
    conn.execute("INSERT INTO usage(user_id, model, tokens, ts) VALUES (?,?,?,?)",
                 (user_id, model, tokens, time.time()))
    conn.commit()
Enter fullscreen mode Exit fullscreen mode

That's it. That's the whole AI SaaS.

Pricing Model (How I Make Money)

  • Starter: $9.9/mo → 500K tokens (you cost me $1)
  • Pro: $29.9/mo → 2M tokens (you cost me $4)
  • Enterprise: $99/mo → 10M tokens (you cost me $20)

Margin: 80% on every plan.

Overage billing kicks in for heavy users — that's where the real profit lives.

What I Did Differently

  1. Multi-model from day 1 — user picks model per request
  2. OpenAI-compatible — drop-in for existing code
  3. No Chinese auth barrier — solved the KYC problem
  4. Usage-based overage — heavy users pay more
  5. Monthly reset — predictable bills

Launch Checklist (48 hours)

  • [x] Landing page (HTML)
  • [x] Signup with email (no password)
  • [x] Free $1 credit
  • [x] OpenAI-compatible API
  • [x] Paddle payment
  • [x] 5 Dev.to articles
  • [x] K3 launch tie-in (most important)
  • [x] 48 AI directory submissions
  • [ ] Hacker News Show HN
  • [ ] Product Hunt launch

Results (30 Days)

  • Users: 0 → 6
  • API calls: 0 → 800+
  • Revenue: $0 → tracking
  • Models: 6 across 3 providers
  • Time to build: 48 hours

Resources

The Real Lesson

AI SaaS in 2026 is not about training models. It's about:

  1. Distribution (where do users come from)
  2. Pricing (how do you make money)
  3. Friction (how fast can they sign up)

I spent 10% of time on the code and 90% on distribution + pricing.

DM me if you want the full architecture diagram.

Top comments (0)