Hey IH! Week 3 update on Underpriced AI (snap a photo -> get instant resale pricing).
The numbers:
The big discovery this week:
A customer emailed saying she couldn't buy more scans. Dug into the logs and found a trailing \n in our Stripe price ID environment variable. Every credit purchase had been broken for weeks. Silent failure — no one could buy scan packs.
But here's where it gets interesting. While auditing the billing, I checked our actual Claude API costs vs what our code was tracking:
Tracked cost per scan: $0.046
Actual cost per scan: ~$0.45
10x off. The culprit: Claude's web search feature. Each scan does 2-3 web searches to verify pricing. Each search result injects ~15K tokens of web content back into the conversation. Our cost tracker only counted input_tokens from the API response — which doesn't include cached tokens or web search result tokens.
The margin problem:
Most users don't max out (avg ~12 scans/mo = $5.40 cost vs $9-19 revenue). But any heavy user is underwater.
What I did:
Other wins this week:
Lesson: Your cost tracking is probably wrong. Don't trust the token counts from your AI provider's API response — check your actual billing dashboard and work backwards.
What's your experience with AI API cost surprises?