
RetouchAI
Create and Expand Your Images with AI in seconds
Ok so I've built an AI-Powered Photo Editor and Generator (iOS app) in a couple of weeks. I wanted to stick to the "build fast, ship fast" philosophy of indie hacking, that's why I focused in just two core features for my app: generating an image using a prompt and expanding an existing image using outpainting capabilities.
Although the MVP is, in fact, very "minimum", I've had to face some technical challenges I wanted to share with you today.
Before we jump into the challenges, here's a quick look at the tech stack I used to build RetouchAI:
- Frontend: React Native with TypeScript.
- Backend: Supabase for storage, database and edge functions.
- AI Integration: StabilityAI's API for image generation and manipulation.
1. What AI to use?
With so many AI models for image manipulation, picking the right one was a hard task. I needed models that were fast, accurate, and specialized for features like object removal and inpainting (future features). I also wanted it to be cheap, of course.
After testing several options, I chose https://stability.ai API. This is a model with all features I required and with a credits-based pricing model, which makes it perfect for my goal.
2. How to use StabilityAI API?
Ok so here's the thing: this API doesn't actually have a SDK I can use to easily integrate the AI capabilities in my app. So I had to directly use axios to make the request.
Since I didn't want to expose my API Key in the frontend, I decided to implement this logic server-side, using Supabase edge functions.
3. Managing User Waiting Time
The image generation/manipulation process takes time. Not so much (around 10-30 seconds) but enough so that the user has to actually wait while this is happening.
I really struggled on how to improve user experience about this. I even thought in implementing a mini-game to keep users entertained, but I ultimately opted for a different approach: informing the user that the process might take some time and they can close the app or switch to other task. They’ll receive a push notification once the image is ready, ensuring they’re notified without having to wait around.
4. Generate Blur Hash for Images
Displaying a placeholder while images are loading is crucial for a smooth experience. I decided to implement Blur Hash, a compact representation of a placeholder image, to show a blurred preview while the full-resolution image is being processed or downloaded.
The problem is: generating this blur hash can take some seconds, and Supabase edge functions allow for a maximum of 2 seconds of CPU time. So I chose to use a different server with more processing power.
But I was spending too much time on this and, since I'm an indie hacker, I decided to leave this improvement for the v2 of the app. The current solution is to show a loading spinner while the image is loading, instead of the blur hash.
5. App Store Submission
Yes, this has been a REAL headache. From meeting all the guideline requirements to handling multiple rejections for minor issues, the submission process was far from straightforward.
I had to tweak the app several times, adjusting permissions, privacy policies, and even the descriptions to get it through. After countless back-and-forths, RetouchAI was finally approved! The lesson? Patience and persistence are key when dealing with the App Store.
About
Be honest: how often have you needed an image of a towering dragon with iridescent, shimmering scales in shades of emerald and sapphire, flying over a volcanic landscape? Yeah me too. Constantly. Here's your solution. Ma

Comment