DEV Community

LONGAI
LONGAI

Posted on

We burned $9,500 on LLM APIs, then built a two-sided marketplace for idle quota

We burned $9,500 on LLM APIs, then built a two-sided marketplace for idle quota

After writing up the seven mistakes behind our $9,500 API bill, one question kept coming back — simpler and harder than any of the seven: why does the same token cost ten different prices on the same day? This is the build log for what we did about it.

The question our $9,500 bill left open

Last month I wrote about how we burned $9,500 on LLM API bills in a single month. The seven mistakes were all real: a retry limit that was never enforced, a routing split that drifted within two weeks, context we never trimmed, streams we opened and abandoned, a cache we trusted more than its hit rate deserved. But that post was about how we call models.

It skipped a blunter question: what are we paying per token, and why is the answer different for everyone?

On the same afternoon, one team pays list price for a model while another team pays a twentieth of that — sometimes a hundredth — for the exact same model. The model isn't different. The difference is who happens to be holding the quota.

We went looking for a place where those two sides could meet. There wasn't one we trusted, so we built it. We call it LONG AI.

Why the same token has ten prices

Capacity for these models is far more fragmented than the pricing pages suggest:

A company buys a large annual package, uses a third of it, and lets the rest expire.
An agency holds an enterprise contract at a low unit price it never fully draws down.
A team buys a prepaid plan, pivots, and leaves a balance parked.
Someone over-ordered for a launch that ended two weeks ago.

An unused balance has negative carry — if it expires, it's worth nothing. That makes it economically rational to sell at almost any price above marginal cost. The deep discounts aren't a promo trick; they're the clearing price of something that would otherwise be thrown away.

On the other side of the market, everyone else is paying full list for those same models. The two sides have never had a place to trade. That gap is the entire product.

What buyers get: one key, 138 live models

For a buyer, the surface is deliberately boring, because boring is the feature:

Drop-in compatibility. Point the base URL at our endpoint and keep the SDK you already use. Both OpenAI-style and Anthropic-style request formats are accepted, so in most codebases the only change is an API key and a URL.
One key, many vendors. 138 models from 51 vendors are live right now, spanning OpenAI, Anthropic, Google, DeepSeek, Kimi, Zhipu and others.
Public price, live discount. Every listing shows the official price next to the marketplace price, so you can see the saving before you commit.
An enforced floor. Nothing goes live unless it's at least 50% below official list. If it's on the marketplace, it's cheaper — no exceptions.
What sellers get: idle quota as a line item

The seller side is where the marketplace actually lives, and it had to be as self-serve as buying:

Paste one or many upstream keys at once (up to 100 per upload; duplicates are removed automatically).
Each key is verified with a real connection that only pulls the model list — it spends no tokens and places no order. You see which keys validated and which didn't, with a plain-language reason for every failure.
Set concurrency (1–100, or unlimited) and serving hours, so your own production traffic keeps priority.
Price two ways: one discount for the whole account, plus optional per-model overrides when a single model is a better buy for you.
Track health per model — success rate, error codes, time-to-first-token, total latency.
Get paid per transaction, with a line-by-line ledger, and withdraw to Alipay, WeChat, or a bank account.
The rules that keep a two-sided market honest

Most of the engineering wasn't routing requests — it was deciding what the market would not let anyone do. A few rules did the heavy lifting.

A hard 50% floor. Low enough to be useful, high enough to filter junk. It also turns "we're cheaper" into something closer to a guarantee.
Only officially priced models can be listed. If a model has no list price, it can't be posted — so no seller can invent a "discount" off a made-up number.
Keys are write-only to the platform. They're encrypted at rest, used only to forward a request, and displayed only as a tail. Sellers can rotate or delete at any time.
A daily inspection at ~04:10. One tiny real request per model. If upstream says a model no longer exists, the listing suspends itself and re-enables automatically when it's back.
Health breaks ties. When two sellers quote the same price, traffic goes to the one with the better success rate, lower latency, and more headroom. Reliability is worth as much as a price cut.
Price changes settle in about 30 seconds, and in-flight calls keep the old price. No one gets billed for a number they never saw.
The numbers, so far

Here's a snapshot of live listings, with the marketplace floor next to the official list price:

Model List price (in / out, per 1M) Marketplace floor % of list Live sellers
GPT-6 Astra ¥66.95 / ¥334.75 ¥0.66 / ¥3.31 1% 10
Claude Opus 5.5 ¥26.78 / ¥133.90 ¥1.33 / ¥6.63 5% 5
Gemini 3.8 Flash ¥5.02 / ¥25.11 ¥0.39 / ¥1.93 7.7% 2
Kimi K3 ¥20.00 / ¥100.00 ¥2.20 / ¥11.00 11% 2
DeepSeek V4 Pro ¥9.00 / ¥27.00 ¥0.99 / ¥2.97 11% 5
GLM-5 ¥4.00 / ¥18.00 ¥2.00 / ¥9.00 50% 3

Prices in CNY as listed at the time of writing; the percentage column is the takeaway.

A few more data points from our own measured posts:

GPT-5.6 Sol: an official price of $4 / $20 per 1M tokens. Across 11 sellers and 12 tiers, the deepest brought it to $0.031 / $0.154 — about 99.2% below list.
Cheapest in each category right now: text at roughly $0.0045 per 1M input tokens, image at about $0.0038 per image, and video at about $0.0017 per second.
Reliability: in a 24-hour test, GPT-5.6 Terra and DeepSeek V4.1 Flash each handled 3,000+ coding requests with zero failures; Gemini 3.8 Flash sustained 111 output tokens per second.
Four things that surprised us
The 50% floor did more marketing than our landing page. A rule that sounds restrictive ended up being the clearest thing we can say: if it's listed here, it's cheaper.
Health beats price more often than we predicted. Sellers who price well but serve badly get out-competed by sellers who charge slightly more and never fail.
The inventory is keys, not models. "Which models do you have?" turned out to be the wrong question; "whose keys are healthy right now?" is the real one.
Zero commission changes behaviour more than we expected. With no take rate during this period, sellers price for volume, which pushes prices down faster than any incentive we could have designed on purpose.
What's next

The marketplace is live and open on both sides. If you're paying list price for models you call every day, the fastest check is to compare your current bill against the listings. If you're sitting on quota you won't use, it's already possible to turn it into a line item.

Browse live prices and models: https://ai.dijinlong.com/
Docs and quickstart: same site, under Help

I'll keep posting the numbers as they change — including the ones that don't flatter us.

Top comments (0)