u/TriggeredAF420

The $5,000 OpenAI bill story: why every vibe-coded app needs rate limiting

Quick PSA for anyone who built an AI app with Lovable, Bolt, or V0:

Your AI endpoint probably has no rate limiting. The AI builder generated something like this:

const { prompt } = req.body;
const response = await openai.chat.completions.create({ ... });
res.json({ result });

Notice what's missing? No auth check. No per-user limit. No per-IP throttle. No cap on prompt size. No max_tokens on the response.

Now imagine someone finds your endpoint URL and points a script at it:

while true; do
  curl -X POST https://yourapp.com/api/chat \
    -H 'Content-Type: application/json' \
    -d '{"prompt": "Write a 5000-word essay"}'
done

That script runs all night. By morning, your OpenAI bill is $1k-$5k depending on the model. The charges have already cleared. Sometimes you can get credits refunded, sometimes not.

The fix is layered rate limiting:

  • Per-IP (5 requests/minute, blocks anonymous abuse)
  • Per-authenticated-user (100 requests/day, prevents legitimate user runaway)
  • Global cost cap (2000 requests/day across everyone, caps total damage)

Plus: cap your prompt.length (reject anything over 2000 chars), set max_tokens on the response, and set up usage alerts in your provider dashboard.

For serverless deployments, Upstash Ratelimit is the standard. Free tier handles 10k commands/day, plenty for most starting apps.

I wrote a longer guide with full code examples for Vercel/Node. Happy to drop the link in the comments if anyone wants it.

Anyone here actually been hit by this? Curious what the real bill numbers look like in the wild.

reddit.com
u/TriggeredAF420 — 20 hours ago

Day 6 of building a productized service. Distribution lessons + the content that's starting to land.

Started Rivetz almost two weeks ago. Productized service that audits Lovable/Bolt/V0-built apps for production-readiness. Audits $1k (3-day turnaround), cleanups $3.5k (2 weeks). 100% async, no calls.

Day 6 of distribution, honest report:

  • 4 Reddit posts: 1 mod-rejected, 1 died at 0 upvotes, 1 got real traction (3 substantive comments from Top 1% users), 1 silently removed
  • 1 X thread: still building
  • 3 cold DMs sent: 2 still unread
  • 0 paying customers

Lesson #1: each Reddit sub has its own personality and rules. Same content played 4 different ways in 4 different subs. The lesson isn't "Reddit doesn't work," it's "find the sub where your specific framing resonates and double down there."

Lesson #2: cold DMs have a structural ceiling on the Lovable audience. Real-revenue builders close their DMs (smart), so the ones with open DMs skew lower-revenue. Reply game on public posts gets more visibility per rep.

Lesson #3: zero customers at day 6 is normal. The compounding window is supposedly days 21-30, so I'm trying to optimize for showing up daily rather than converting any individual rep.

The content that's been hitting (in case it's useful) is a 5-issue list of production problems in AI-built apps:

  • API keys in JS bundles (View Source, search "sk_")
  • Supabase RLS off by default
  • No rate limits on AI endpoints
  • Stripe webhooks not signature-verified
  • Server trusting client-side validation

I wrote a longer checklist with the actual fixes for all 14 of these issues. Happy to drop it in the comments if anyone wants it.

Two open questions if anyone has been through this:

  1. Productized service pricing (fixed price, async-only, no calls): scales vs doesn't?
  2. Distribution: anyone broken through the "days 21-30" valley and have suggestions for what to optimize for besides daily reps?
reddit.com
u/TriggeredAF420 — 1 day ago