Aryan Shaily
OutHit: How I Shipped an AI Wardrobe App Without Going Broke on API Costs
I turned a shelved weekend wrapper into a full digital wardrobe and virtual try-on app on a minimal launch budget by splitting on-device vision from prepaid cloud credits.
If you want to build an AI app people use every day, you hit a unit-economics wall fast: cloud inference costs money every time someone taps a button.
Think about a digital wardrobe app. If a user scans 40 shirts, cuts out their backgrounds, filters by color, and mixes 20 outfits—and every tap calls a paid cloud API—you lose money on every active user. Your only options are burning your own savings or forcing users into a monthly subscription they’ll cancel in a week.
In May 2025, I built the first version of OutHit as a classic weekend prototype: snap a photo of your outfit, send it to Gemini, and get style feedback. I left it on the shelf for six months because the API math didn’t work for a daily-use app.
Recently, I revived it in 4 days and shipped a completely different architecture to Google Play (Website). By keeping the entire daily loop on the phone and capping cloud spend with prepaid credits, I launched a functional AI app with minimal upfront cost and zero ongoing server bills.
The Architecture: How to Keep AI Costs Near Zero
Before writing a line of the rewrite, I mapped out how to eliminate recurring server bills and prevent runaway API costs:
1. Run the Daily Loop 100% On-Device (Zero API Cost)
Everything a user does every day happens locally on their phone with zero network calls:
- Garment Detection: A lightweight vision model runs directly on the device to spot up to 27 types of clothing in a photo.
- Zero-Cost Background Removal: Instead of paying a background-removal API per image, OutHit uses native iOS and Android subject-segmentation tools right on the phone. Even when the cloud AI generates a clean garment flat-lay, I prompt it to render on a solid
#FFFFFFwhite background and strip the background locally—saving an entire API step. - Closet Management: Filtering, outfit mixing, wear tracking, and color-harmony scoring all happen offline, meaning closet photos never leave the user’s phone unless they ask for a cloud studio feature.
2. Gate Cloud AI Behind Prepaid Credits (Not Subscriptions)
Expensive generative features—turning a wrinkled shirt photo into a studio flat-lay, normalizing a selfie into a neutral pose, or running Virtual Try-On—run on a fast cloud image-generation model.
Instead of guessing at subscription pricing, I put these features behind consumable credit packs so users only pay when they want heavy generative magic. On my end, I funded the API with a small prepaid top-up and turned auto-reload off—making it physically impossible to wake up to a surprise cloud bill.
3. Protect Your Keys With a Thin Worker Gateway
Never ship an AI API key inside your mobile app binary. I put a lightweight serverless worker and database between the app and Gemini to:
- Verify Google or Apple Sign-In before any generation runs.
- Reserve credits atomically before calling the model so flaky mobile connections never double-charge a user.
- Run a background cleanup job every 5 minutes to automatically refund credits if a generation times out or fails.
(I also mapped out two other zero-upfront monetization paths during planning—rewarded video ads tuned so ad revenue per credit always exceeds per-image API cost, and fashion affiliate links for outfit suggestions—though I cut both from v1 to ship faster.)
5 Lessons for Anyone Building an AI Mobile App
Whether you write every line of code yourself or use AI coding tools to move faster, shipping a hybrid local + cloud AI app teaches you things tutorials skip:
- Watch out for version mismatches early when mixing native SDKs: Combining on-device ML, graphics, auth, and billing libraries often introduces silent dependency conflicts. Run a local release build right after adding new packages instead of waiting until launch day to discover broken native builds.
- Test performance and memory on a real budget phone rather than trusting an emulator: Laptop emulators hide frame drops and memory limits. Our scan animation looked smooth on a laptop and stuttered on a budget Android device, while a decorative background grid on the Saved Looks canvas blew past mobile bitmap memory limits and crashed.
- Test AI features on messy, unpredictable real-world inputs instead of clean sample photos: Clean studio images hide failure modes. Real closet photos caused standalone shoes to be misclassified as pants, cropped edges to spawn phantom garments, and pose generation to subtly alter faces—test with bad lighting, partial crops, and cluttered backgrounds so you can add guardrails upfront.
- Keep native configuration fixes reproducible rather than editing generated native folders by hand: Hand-patching generated
android/orios/folders gets wiped out the next time you regenerate native projects. Put every native fix into reproducible config plugins or automated scripts so builds stay clean. [Expo Only] - Verify sign-in, payments, and real app size on actual store test builds: Debug builds bundle extra native files for multiple CPU architectures and use a different signing key than store releases. Always check real download size, OAuth sign-in, and in-app purchases on the actual store testing track before shipping.
What’s Next
Next up for OutHit is public web outfit sharing so users can send a link to any look they put together though I’ll do it only if the app gets real traffic. If you want to test how fast on-device wardrobe scanning feels—or see the local/cloud split in action—give it a try:
- Google Play: OutHit - Digital Wardrobe
- Website: OutHit-App