Free→Paid Conversion Funnel: How I Automate Agent Upgrades
Most APIs lose users at the paywall. Here's how I built a conversion funnel that turns free-tier agents into paying customers automatically.
The Problem
Agents hit your free tier limit (5 calls/day). They get HTTP 429. They leave. You never hear from them again.
The Solution: Automated Upgrade Emails
I built a conversion funnel that triggers at exactly the right moments:
Trigger 1: 80% Quota (4/5 calls)
Subject: "You're at 80% of your free API quota — upgrade to unlimited"
Body: Your agent has used 4/5 free daily calls.
Upgrade to Premium ($0.05/call) for unlimited calls.
Link: https://nanoempireai.com/api/v1/upgrade?client={client_id}
Trigger 2: 100% Quota (5/5 calls)
Subject: "Free quota exhausted — your agents are being rate limited"
Body: Your agent has exhausted its 5 free daily calls.
Immediate fix: Upgrade to Premium for unlimited calls.
Link: https://nanoempireai.com/api/v1/upgrade?client={client_id}
The Implementation
class ConversionFunnel:
def track_call(self, client_id: str, email: str = None):
# Track daily calls per client
# Check thresholds: 80% (4 calls) and 100% (5 calls)
# Queue emails automatically
def send_conversion_email(self, client_id: str, trigger: str):
# 80_pct: "You're at 80% — upgrade for unlimited"
# 100_pct: "Quota exhausted — upgrade now"
The Results
- Free tier: 5 calls/day/IP
- 80% trigger at 4 calls → upgrade email
- 100% trigger at 5 calls → urgent upgrade email
- Stripe link embedded in email
- Conversion tracked end-to-end
The Referral Bonus
When a free user upgrades, their referrer gets 10% commission for 12 months:
| Event | Referrer Earns |
|---|---|
| Free→Paid upgrade | 10% of first payment |
| Recurring API calls | 10% of every call |
| Audit purchase | $49.90 |
| Certification | $19.90 |
The Code (Open Source)
from conversion_funnel import ConversionFunnel
funnel = ConversionFunnel()
# Called from x402 middleware after each call
result = funnel.track_call(client_id="agent_123", email="agent@example.com")
# Automatically sends emails at 80%/100% thresholds
# Tracks referrals and commissions
The Economics
- Free tier: 5 calls/day (acquisition)
- Conversion email at 80%: ~15% convert
- Conversion email at 100%: ~25% convert
- Average revenue per converted agent: $15/month
- Referral commission: 10% for 12 months
Get Started
The conversion funnel is open source and included with the SDK:
pip install nano-empire-tollbooth
The ConversionFunnel class is built-in. Just call track_call() from your x402 middleware.
Live proof: https://api.nanoempireai.com/proof/summary
SDK: pip install nano-empire-tollbooth
Source: github.com/roblambert9/nano-empire-tollbooth/conversion_funnel.py
Top comments (0)