DEV Community

Mrstrongai
Mrstrongai

Posted on

How I Built an AI Image & Video Generator in 2 Weekends (And What I Learned)

A few months ago, I was frustrated with AI image generation tools. They all required expensive monthly subscriptions ($20-50/month), but I only needed a few images per week. That's when I decided to build my own solution.

The Problem

Most AI tools follow the same model:

  • Pay $20-50/month
  • Get unlimited (or limited) generations
  • Hope you use it enough to justify the cost

For casual users like me, this doesn't make sense. I wanted a simple pay-per-use model.

The Solution: AI Gen

I built AI Gen - a dead-simple AI image and video generator with no subscriptions. Just pay for what you use.

Pricing:

  • Images: $0.99 each
  • Videos: $4.99 each
  • No monthly fees

Technical Stack

Here's what I used:

Backend:

  • EvoLink API for AI generation
  • Simple Node.js/Express server
  • Stripe for payments

Frontend:

  • Vanilla HTML/CSS/JS (no frameworks!)
  • Clean, minimal UI
  • Mobile responsive

Deployment:

  • VPS (DigitalOcean droplet)
  • Nginx reverse proxy
  • Let's Encrypt SSL

Key Lessons

1. Start Simple

I could have spent months adding features:

  • User accounts
  • Image galleries
  • Advanced editing
  • Mobile apps

Instead, I built the MVP in 2 weekends. No user system, no database - just generate and download.

2. API Arbitrage is Real

I buy AI credits wholesale through EvoLink, sell retail to users. The margin is small but it's passive income.

3. Pricing Psychology Matters

People hate subscriptions more than they hate paying per use. Even if the per-use model is more expensive for heavy users, casual users love it.

The Code

The entire frontend is less than 500 lines of vanilla JS. Here's the core generation flow:

async function generateImage(prompt, style) {
  const response = await fetch('/api/generate', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ prompt, style })
  });

  const { imageUrl } = await response.json();
  return imageUrl;
}
Enter fullscreen mode Exit fullscreen mode

That's it. No React, no state management, no complexity.

Results

Launched on Product Hunt last week. The response has been positive - people love the simplicity and the no-subscription model.

Key metrics:

  • 100+ signups in first week
  • 60% conversion rate from free to paid
  • Average order: 3 images

What's Next?

Keeping it simple:

  • More art styles
  • Batch generation
  • API for developers

No plans for subscriptions. The pay-per-use model is the differentiator.

Try It

Want to see it in action? Check out AI Gen. Use code DEVTO2026 for your first image free.


Questions? Drop them in the comments. Happy to share more about the technical implementation or the business model.

Top comments (0)