DEV Community

Play Button Pause Button
ANIRUDDHA  ADAK
ANIRUDDHA ADAK Subscriber

Posted on

Teen Ad Generator

This is a submission for the Google AI Studio Multimodal Challenge

What I Built

In a world saturated with digital noise, how do you capture the attention of one of the most discerning audiences out there: teenagers? Standard marketing tactics often fall flat, perceived as out-of-touch or cringe-worthy. My applet, the Teen Ad Generator, tackles this challenge head-on.

It's more than just a text generator; it's a creative co-pilot for marketers, content creators, and anyone trying to connect with Gen Z. The app takes a user's basic product idea and, with a spark of AI-driven creativity, transforms it into a full-fledged, quirky ad campaign. It generates a unique campaign name and ten distinct ad variations, all infused with bizarre, memorable phrases like "nano banana" and "zing imaginfoor" to create a brand voice that stands out.

The goal was to create an experience that feels less like work and more like play, empowering users to move from a blank page to a share-ready campaign in seconds, complete with tools for editing, image generation, and social sharing.

Demo

You can try the live applet here: Link to Deployed Applet

Here’s a quick walkthrough of how it works:

  1. Spark an Idea: The user starts by entering a product concept into a clean, intuitive form. If they're feeling stuck, they can hit the "Get Creative Suggestions" button to get a fresh dose of inspiration from Gemini.

  2. AI Magic: With a single click on "Generate Ads," the app calls the gemini-2.5-flash model. A sleek loading animation lets the user know the creative circuits are firing.

  3. Campaign Unveiled: In moments, the app displays a catchy campaign name and a grid of ten unique ad copy variations. Each ad is presented on its own card, ready for the next step.

  4. From Words to Worlds: This is where the multimodal magic happens. With another click, the user can generate a unique image for any ad copy using imagen-4.0-generate-001.

How I Used Google AI Studio

Google AI Studio was the heart of this project—my digital workbench for prompt engineering. The success of the app hinges on the quality and consistency of the AI's output, and AI Studio provided the perfect playground for this.

My process involved:

  1. Prompt Prototyping (gemini-2.5-flash): I iteratively tested and refined the system instructions in AI Studio. I experimented with different tones (witty, chaotic, professional) to find the perfect persona for the "Gen Z marketing genius" AI.

  2. Structured Output: The real game-changer was defining a strict JSON schema. By providing the model with a clear responseSchema, I could ensure the API returned perfectly formatted data (campaignName and an array of 10 ads) every single time. This eliminated the need for fragile string parsing on the frontend and made the integration incredibly robust.

  3. Visual Prompting (imagen-4.0-generate-001): For the image generation, I used AI Studio to test how to best wrap the ad copy into a larger prompt that would encourage a modern, social-media-ready aesthetic, ensuring the visuals matched the vibe of the text.

Multimodal Features

The core multimodal feature is the seamless synergy between text and image generation, turning abstract ideas into tangible, visual concepts.

  1. Context-Rich Text Generation: First, the app generates creative ad copy using gemini-2.5-flash. This isn't just random text; it's a narrative foundation, packed with specific, quirky details.

  2. Text-to-Image Generation: Then, that specific text is used as a powerful, context-aware prompt for imagen-4.0-generate-001.

This workflow is what enhances the user experience. It closes the creative loop. A user doesn't have to just imagine what "Unlock your cosmic drip with the nano banana" looks like; they can see it with one click. This transforms the app from a simple copywriter into a mini creative studio, making the ideas more powerful and instantly ready for any social media feed.

Top comments (0)