Inspiration

The idea came from a real frustration: small business owners and solo developers especially across Africa have great products but no budget for professional video production. A 30-second ad from an agency costs hundreds of dollars and weeks of back-and-forth. We wanted to collapse that entire process into a single input: paste a URL, describe your product, or upload a screenshot, and walk away with a ready-to-post MP4 in under two minutes.

What it does

AdGen AI is a full-stack web application that turns any product into a professional video advertisement automatically. A user provides their product via URL, image upload, or plain text description. From that single input, the platform writes a scene-by-scene ad script using Groq (Llama 3.3 70B), records a natural voiceover using Edge TTS, fetches professional stock photography from Pexels, assembles everything into an animated MP4 with Ken Burns motion effects and text overlays using MoviePy and FFmpeg, and stores every generated asset alongside a full provenance record in Backblaze B2 cloud storage. The result is a downloadable, shareable video ad no design skills, no video editor, no agency required.

How we built it

The backend is FastAPI (Python), with the Genblaze SDK orchestrating the multi-provider generative media pipeline across Groq, Edge TTS, Pexels, GMI Cloud, and Pollinations.ai. Every generated asset the script, voiceover MP3, scene images, and final MP4 is uploaded to Backblaze B2 with a provenance.json record that logs which model and provider produced each file. The video assembler uses MoviePy with PIL-rendered animated text overlays, gradient backgrounds, and LANCZOS-quality Ken Burns pan/zoom effects composited frame by frame. The frontend is React + TypeScript + Tailwind CSS, with a real-time polling pipeline tracker that shows each generation step as it completes, and a video player that streams directly from a FastAPI /api/media/{job_id}/video endpoint rather than from B2 (solving CORS and private-bucket access issues). Jobs are stored in-memory with a clean REST API

Challenges we ran into

The hardest problem was video playback. The generated MP4 uploaded to B2 successfully every time, but the browser tag couldn't play it because the B2 bucket is private and the download URL has no auth token the browser can use. The fix was to save a local copy of every video to a persistent ./output_videos/ directory and serve it through a FastAPI FileResponse endpoint the browser plays from the local server while B2 holds the permanent backup. Image quality was the second major challenge. Pollinations.ai had seed=42 hardcoded, meaning every scene in every ad received the same image. We also discovered that the Ken Burns video assembler was using Image.BILINEAR for frame upscaling, producing visible blur. Both were fixed: seeds are now derived per-scene, all resizing switched to Image.LANCZOS, and Pexels real stock photos were added as the primary image source. Genblaze orchestration across five providers with different APIs, response formats, and failure modes required careful fallback logic so the pipeline never fully breaks regardless of which API keys are present.

Accomplishments that we're proud of

The end-to-end pipeline from raw URL to downloadable MP4 works in under 90 seconds on a standard machine. The provenance system records exactly which AI model and provider produced every asset in the final video, which is something most generative media tools don't expose. The fallback chain means the app produces a usable output even if GMI Cloud credits are exhausted and Pexels isn't configured it degrades gracefully rather than failing

What we learned

Real stock photos (Pexels) produce dramatically better video ads than AI-generated images for the same use case not because AI images are bad, but because professional photography is sharp, contextually accurate, and instantly recognizable in a way that matters for advertisements. We also learned that Groq's keyword extraction step (distilling a verbose visual prompt into 3-5 search terms) is the highest-leverage improvement in the entire image pipeline better inputs to Pexels and Pollinations alike.

What's next for ad-gen AI

Custom voice cloning so users can narrate in their own voice. A brand kit feature that applies consistent colours, fonts, and logo overlays across all generated scenes. Support for longer-form content (product demo videos, explainers). A scheduling integration so generated ads can be posted directly to social platforms. And a white-label SDK so other platforms can embed the generation pipeline.

Built With

Share this project:

Updates

Submission history