The Unit Economics of Virality: How We Scaled Gemini 1.5 Pro to 50k Users Without Going Bankrupt
Alex Torres refreshed the Stripe dashboard for the hundredth time.
1,847 new sign-ups today.

Three days ago, Docket had 200 total users. Today, they broke 50,000.
Their new AI feature, a risk analysis engine powered by Google Vertex AI and Gemini 1.5 Pro had gone absolutely viral. A partner at a Tier-1 law firm had tweeted about it, and suddenly, every junior associate in Manhattan was uploading 200-page merger agreements.
The product was magical. You could upload a massive legal document, and within 90 seconds, the AI would flag specific liability risks, cross-referencing them against 50+ uploaded legal precedents.
Alex should have been ordering champagne. Instead, he was staring at his Google Cloud Platform (GCP) billing console with the specific type of nausea usually reserved for a lawsuit.
Yesterday’s GCP bill: $14,847.

Budgeted Monthly Spend: $3,000.
At this run rate, the company had exactly 41 days of cash left.
This is the story of how we almost died from success, and how we fixed our unit economics in 48 hours using a secondary infrastructure market I didn’t even know existed.
Part 1: The “Unshippable” Innovation
To understand why we were burning cash so fast, you have to understand the architecture. We didn’t choose Google Gemini 1.5 Pro because it was trendy. We chose it because nothing else worked.
Docket started as a boring document management platform. We had 11 months of runway left from our Seed round and mediocre growth. We needed a differentiator.
When Google released Gemini 1.5 Pro with its 2 million token context window , my co-founder Emma saw the opening immediately.
“Most legal AI is garbage,” she argued. “It chunks documents. It summarizes Section A, then summarizes Section B, and loses the connection between them. Law relies on context. If a clause on Page 5 contradictions a definition on Page 140, a standard RAG (Retrieval-Augmented Generation) pipeline misses it.”
Gemini was different. It could ingest:
- The full 200-page agreement.
- Decades of case law.
- Client-specific guidelines.
- State regulations.
All in a single prompt.
We built the prototype in Google Vertex AI Studio . The results were terrifyingly good. It didn’t just summarize; it reasoned. It found “orphaned references” that human lawyers missed.
We launched the “AI Risk Analyzer” on Tuesday. By Friday, we were the hottest startup in LegalTech.
Part 2: The Math That Kills You
Here is the dirty secret of GenAI startups: Product-Market Fit is often inversely correlated with Gross Margins.
When users love your product, they use it heavily. If your unit economics are negative, virality is a death sentence.
Here was our math:
- Average Contract: 150 pages (approx. 100k tokens).
- Context Material: Case law & precedents (approx. 400k tokens).
- Output: Detailed risk memo (approx. 50k tokens).
- Total Context per Query: ~550,000 tokens.
The Vertex AI Bill:
- Input Cost: $1.25 per 1M tokens.
- Output Cost: $5.00 per 1M tokens.
- Vector Search & Storage: ~$0.30 per query.
Total Cost Per Analysis: ~$4.73.
We offered a “Freemium” model: 5 Free Analyses to prove value, then $99/month.
With 50,000 users redeeming their free credits:
50,000 users × 5 analyses × $4.73 = $1,182,500.
We had $800,000 in the bank.
The Emergency Board Meeting
Wednesday, 9:00 AM. Zoom.
“Walk me through the cohort retention,” said Sarah, our lead investor.
“Retention is incredible,” Emma said, pulling up the charts. “If we convert just 8% of these users, we hit $400k MRR next month. We skip Series A and go straight to Series B metrics.”
“Great,” Sarah said. “And the burn?”
“We are burning $47,000 a day on computation.”
The silence on the call lasted a full ten seconds.
“You have two options,” Sarah said, her voice flat. “Turn off the free tier, or switch to a cheaper model. You cannot raise a bridge round on negative gross margins. VCs fund growth; they don’t fund charity.”
Part 3: The Optimization Trap
For the next 24 hours, Emma and I tried to “engineer” our way out of the hole. This is the trap every technical founder falls into. We assumed the solution was in the code.
Attempt 1: Switch to GPT-4o or Llama 3
We ran benchmarks. While excellent for reasoning, the context window management on the open-source models (hosted on cheaper GPUs) was a nightmare. The “hallucination rate” on legal citations jumped from 0.2% to 14%. In law, a 14% error rate gets you sued.
Result: Rejected.
Attempt 2: RAG & Chunking

We tried breaking the contracts into smaller pieces to reduce token count. The AI immediately lost the ability to spot cross-document conflicts, the very feature that made us viral.
Result: Product became mediocre.

Attempt 3: Kill the Free Tier
We A/B tested reducing the free tier from 5 docs to 1 doc.
Conversion rate dropped from 12% to 1.5%.
Users needed to see the magic on multiple document types to trust it with their credit card.
We were stuck. We had built a Ferrari engine that consumed fuel faster than we could pour it in.
Part 4: The Discovery
Thursday, 2:00 AM.
I was in a private Slack community for YC founders, doom-scrolling through the #infrastructure channel. I typed out a desperate message:

“Anyone scaling on Vertex AI/Gemini? Our bill just crossed $50k/month and we’re barely a week into launch. Unit economics are underwater. Is there a secret volume tier I’m missing?”
Twenty minutes later, a founder I respected, Dev, who runs a massive video-processing AI startup replied.
@Dev: “Don’t pay retail, man. Retail cloud pricing is for suckers and enterprises who don’t care. Check the secondary markets. We cut our GCP bill by 50% using Credex.”
Credex?
Get Credex’s stories in your inbox
Join Medium for free to get updates from this writer.
Remember me for faster sign in
I clicked the link. It described itself as a “Verified Marketplace for Unused Cloud Credits.”
My scam radar went off immediately. Buying cloud credits? Is that even legal?
But Dev was a serious operator. So I dug in. I read their documentation. I read the legal frameworks. I looked at the testimonials.
The Logic of the Marketplace:

It wasn’t a “hack.” It was market efficiency .
Part 5: The Turnaround
By Friday morning, we were on a call with the Credex team.
“I need to know two things,” I told them. “Is this safe, and do I have to rewrite my code?”
The account manager, Jordan, didn’t give me a sales pitch. He walked me through the mechanics.

1. The Safety Protocol:
“We don’t just hand you a login,” Jordan explained. “We execute a full Ownership Transfer. You get the root admin credentials. The original owner is removed. We sign Mutual NDAs. Plus, we only source from verified US/EU entities. If Google ever flags the account (which hasn’t happened in 18 months), we have a 100% Replacement Guarantee.”
2. The “No-Code” Migration:
“You’re currently hitting the Vertex API using a Service Account Key from Project A,” Jordan said. “If you buy a package from us, we give you Project B. You generate a new Service Account Key. You swap the JSON file in your backend. You redeploy. That’s it.”
3. The Offer:
They had a $350,000 Google Cloud Credit package available.
Cost to us: ~$140,000.
Discount: 60% OFF.
I did the mental math.
If we bought this, our cost per analysis dropped from $4.73 to $1.89.
At $1.89, our unit economics were… profitable.
We signed the contract that afternoon.
The Migration (It took 4 hours)
The “migration” was laughably simple compared to the engineering overhauls we had been considering.

Saturday Morning: The New Dashboard
I woke up and checked the logs. Traffic was still surging another 12,000 queries overnight.
I checked the billing.
Cost incurred: $22,000 (in credits).
Real cash cost to us: $8,800.
We were no longer bleeding out. We were building a war chest.
Part 6: From Defense to Offense
The psychological shift that happens when you fix your unit economics is profound.
On Wednesday, we were discussing layoffs and killing the free tier.
On Monday, with our infrastructure costs slashed by 60%, we went on the offensive.
1. We Doubled Down on the Free Tier
Competitors were tightening their belts; we expanded our free trial to include “Historical Analysis” of past contracts. Why? Because at $1.89 per query, we could afford to acquire customers aggressively.
2. We Kept Our Pricing Competitive
We locked in our $99/mo price point. Competitors using standard GCP pricing literally could not match us without losing money. We had an invisible moat built on better procurement.
3. We Scaled Confidence
When you know your infrastructure is 60% cheaper than the market rate, you build differently. We launched features like “M&A Due Diligence Automation” heavy compute tasks that we previously thought were too expensive to run.

The Result
Three months later (today):
- Users: 180,000+
- MRR: $1.7M
- Gross Margin: 68% (up from -12%)
We closed our Series A last week. The first slide in our pitch deck wasn’t our team or our TAM. It was a chart showing our Customer Acquisition Cost vs. Lifetime Value , underpinned by our optimized infrastructure costs.
The Lesson: Procurement is a competitive advantage
Founders obsess over code quality, design, and sales. But in the AI era, computation is your COGS (Cost of Goods Sold).
If you are a manufacturing company, you don’t buy steel at retail prices from Home Depot. You buy wholesale.
Yet, thousands of AI startups are buying their “raw material” (tokens/compute) at full retail price from Google and AWS.
Credex wasn’t just a vendor we used; it was the cheat code that allowed us to survive our own viral success.
If you are building on Vertex AI, AWS Bedrock, Anthropic, Claude or OpenAI, and you are terrified of your next bill, stop trying to optimize your prompts.
Optimize your bill.
There is a secondary market for this stuff. It is legitimate, it is massive, and it is the only way to scale unit economics in the age of heavy computations.
Don’t let a cloud bill kill your unicorn.
Ready to fix your margins?
Check out Credex.
- Up to 60% off AWS, GCP, Anthropic, Claude and OpenAI credits.
- Verified Accounts (Tier 5 / Enterprise).
- Secure Transfer with full guarantees.
Credex Resell Unused AI & Cloud Credits Easily
credex.rocks
Find us on LinkedIn
This story is based on the real journey of a Credex client founder, though the founder’s name and company name (Docket) have been changed to protect their privacy. The challenges, economics, and solutions described are drawn from authentic experiences navigating AI infrastructure cost optimization in 2024–2025.
Credex represents an emerging category in AI infrastructure: verified marketplaces for discounted LLM credits with full ownership transfer, enterprise rate limits, NDA protection, and refund guarantees. For founders exploring LLM cost optimization or buying GCP, Gemini or Vertex credits at a discount, the question isn’t whether these solutions exist it’s whether you’ll discover them before your runway runs out.