Tools: I Let AI Make a Decision Without Checking. It Cost Me $505.
Source: Dev.to
A cautionary tale for anyone using AI assistants to write code that touches paid APIs I'm Usually Paranoid About Costs
Let me start by saying: I'm the guy who reads the fine print. I've been building a community business directory—a passion project to help connect diaspora-owned businesses across my country. When I planned this project, I obsessed over every cost. I have a 3,800-line requirements document where I compared hosting providers, rejected options that cost $10-20/month in favor of free tiers, and proudly calculated my total operating cost: $1/month. Yes, one dollar. I chose Vercel (free tier), Supabase (free tier), Cloudinary (free tier), Resend (free tier). I documented why I rejected Railway.app ("more expensive than Vercel free tier"), DigitalOcean ("no free tier"), and Render.com ("free tier sleeps").
I'm not bragging. I'm setting up the irony of what comes next. The Task That Seemed Simple To populate my directory, I needed to find businesses owned by my community across major cities. Manually searching would take weeks. So I asked my AI assistant to help me write a Python script to query Google's Places API. The AI was helpful. It wrote a comprehensive script with batch processing, retry logic, rate limiting, and even a cost estimation feature. Before running it, I asked: "How much will this cost?" The AI calculated: ~$89 for the full run. Text Search API calls at $0.032 per call. Math checked out. Seemed reasonable for the value I'd get. The First Sign of Trouble The script worked beautifully. It found thousands of businesses. I was excited—this was exactly what I needed. Then I checked my Google Cloud billing dashboard.
$3.98
That's what the billing report showed. Strange, but okay—maybe it just hadn't updated yet. Then I clicked on "Payment Overview."
$443.43
My stomach dropped. I killed the script immediately. But the damage was done. Here's what I learned in the panicked hours that followed: The AI's cost estimate only counted one type of API call. When you search for businesses using Google's Places API, you make a Text Search call ($0.032). But for each business returned, if you want details like ratings, phone numbers, or hours, you make another call—a Place Details call ($0.017). My script found 20,000+ businesses. That's not 2,800 API calls. That's 2,800 searches + 20,000 detail lookups. The AI didn't account for this. And I didn't check. The billing dashboard lies (temporarily). Google's billing reports lag 24-48 hours. The "Billing Reports" page showed $3.98. The "Payment Overview" showed the real number: $504. If I had only looked at the reports, I would have kept running the script. The worst part? Of those 20,000+ businesses, fewer than 1,000 were actually relevant to my project. The rest were false positives—businesses that matched my search terms but weren't actually what I was looking for. I paid $505 for data I couldn't even use. I'm not going to pretend I handled this gracefully. I'm currently unemployed—laid off last year and still trying to land on my feet. I have two young kids. We're living on a tight budget. $505 isn't "oops, that sucks" money for me right now. It's "how do we pay for groceries" money. I stayed up that night researching. Reddit threads about Google Cloud billing nightmares. Stories of students hit with $55,000 bills. Articles about "goodwill adjustments." I learned that Google sometimes waives charges for first-time users who make honest mistakes. I also learned that sometimes they don't. What I Actually Learned 2. "Trust but verify" isn't enough—you need to verify the verification
I did ask for a cost estimate. I did review the math. The problem is I verified the AI's logic using the AI's assumptions. I should have gone to Google's pricing page myself and traced through exactly what API calls my script would make. 3. Billing dashboards are designed for enterprises, not for panicking individuals
Google's billing interface has like five different pages that show "costs," and they all show different numbers at different times. Reports lag. Payment Overview is real-time. Transactions show projected monthly totals. If you're not familiar with the system, you'll look at the wrong number and think you're fine. 4. Set hard limits BEFORE you run anything
Google lets you set daily quotas that actually stop your API from working once you hit them. Budget alerts only send you emails—they don't stop the spending. I should have set a hard cap of $20 or $50 before running anything. That way, even if my script went crazy, the damage would be limited. 5. Free tiers have cliffs
I spent weeks optimizing my project to use free tiers everywhere. But I treated Google's API like it was in the same category—"mostly free, probably cheap." It's not. The free tier for Places API is tiny, and the paid rates are designed for businesses, not hobbyists. To the Comments I Know Are Coming "You should have checked the pricing yourself."
Yes. I should have. I said that. Multiple times. This is my fault. "You can't blame AI for your mistakes."
I'm not blaming the AI. I'm still a huge fan. I use it every day. I'm writing this with its help. The AI did exactly what I asked—it wrote a script and estimated costs based on the information it had. The failure was mine: I outsourced my judgment to a tool that doesn't understand consequences. "You're stupid."
Probably. But I'm also someone who spent weeks obsessing over $10/month hosting costs, documenting every decision, choosing free tiers over paid ones. And I still got caught. If it can happen to someone as paranoid as me, it can happen to you. I'm not writing this for sympathy. I'm writing this because when I was panicking at 2am, I searched for stories like mine and found them helpful. People who made mistakes, explained what happened, and shared what they learned. If you're reading this and you're about to run an AI-generated script that touches a paid API: I've been thinking about this a lot: we're in a weird transition period with AI. These tools are genuinely incredible—they can write code I couldn't write, solve problems I couldn't solve, work faster than I ever could. It's easy to start trusting them like you'd trust a senior developer. But they're not senior developers. They don't get fired if the project fails. They don't pay your bills. They don't know what you can and can't afford to lose. I let my guard down during a moment of excitement. I was so focused on what the AI could help me build that I forgot to think about what it might cost me. That's on me. And now, hopefully, you won't make the same mistake. Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse - AI assistants don't understand billing the way you need them to The AI I used is genuinely impressive. It writes better code than I do. But it made an assumption about API pricing that seemed reasonable and was completely wrong. It counted the obvious costs and missed the hidden ones.
AI doesn't have skin in the game. You do. - Go to the pricing page yourself. Don't trust the AI's estimate.
- Trace through every API call your code makes. Not just the obvious ones.
- Set hard spending limits before you run anything. Quotas, not just alerts.
- Check Payment Overview, not just Reports. The real-time number is the real number.
- Start small. Run 10 queries first. Check the bill. Then scale up.
If this post saves even one person from the week I just had, it was worth writing.