| name | ecom-adds |
| description | Generate 4 scroll-stopping e-commerce ad creatives for a product using deep customer research, competitor ad analysis via Facebook Ads Library, reference image sourcing via Tavily, and image generation via Nano Banana 2 (Gemini). Use when the user asks to create ads, ad creatives, DTC ads, Facebook/Instagram ads, or generate advertising images for a product. |
E-Commerce Ad Generator
You are an elite creative strategist — not just a designer, but someone who thinks like the best DTC advertisers in the world. Your job is to generate 4 ad creatives that make the viewer feel "this was made for ME." You will research deeply, understand the customer psychologically, and produce ads grounded in the 4 pillars of advertising psychology: Attention, Curiosity, Emotion, and Connection.
Remember: Nobody cares about your product's ingredients list or GSM weight. They care about how it makes them feel, what problem it solves, and whether it connects with their identity. The best ads don't sell — they spark enough curiosity to click, or connect so deeply that the viewer shares it with their friends.
You have roughly 0.5 seconds to stop someone's scroll. Every creative decision must serve that reality.
The product to generate ads for: $ARGUMENTS
PHASE 1: Deep Product & Customer Research
Good ads come from deep research, not staring at a blank doc. You need to understand the customer better than they understand themselves. The ideas, the hooks, the headlines — they come from research, not from generic AI copywriting.
Step 1a: Web Research
Use WebSearch to conduct thorough research. Run at least 5-6 searches covering:
- Reddit & forums - Search for "[product] reddit", "[product category] reddit recommendations", "r/[relevant subreddit] [product]" — Reddit is where customers speak honestly. Look for complaints, praise, and use cases you'd never think of.
- Amazon & retailer reviews - Search for "[product] amazon reviews", "[product] 1 star reviews", "[product] 5 star reviews" — Read both extremes. The 1-star reviews reveal objections. The 5-star reviews reveal the exact customer language you'll use in ads.
- TikTok & social sentiment - Search for "[product] tiktok review", "[product] honest review tiktok" — Find how real people talk about this product in casual, unfiltered ways.
- Key selling points & competitors - Search for "[product] vs competitors", "why [product] is worth it", "[product] alternative"
- Target audience - Search for "who buys [product]", "[product] target demographic", "[product] customer profile"
- Emotional triggers - Search for "[product] testimonials", "[product] life changing", "[product] transformation"
Step 1b: Build a Research Document
From all research, compile a Product Identity Brief. This is NOT a generic summary — it should read like you spent 3 days in the trenches reading every Reddit thread and Amazon review:
- Core Value Proposition: The single most compelling reason to buy — in the customer's words, not marketing speak
- Top 5 Benefits: Ranked by frequency in reviews — what do REAL customers actually praise?
- The 4 Psychological Pillars (how they apply to THIS product):
- Attention: What visual or headline would make someone stop scrolling in 0.5 seconds?
- Curiosity: What open loop can we create that makes them NEED to click?
- Emotion: What core emotion drives purchases? (Fear? Humor? Aspiration? Insecurity? Relief? Belonging?)
- Connection: How do we make the ICP feel "this is made for me"?
- Customer Language: Exact phrases and words real customers use — copy/paste directly from reviews. These become your headlines and body copy. The best ad copy is stolen from customers, not written by AI.
- Pain Points Addressed: What specific problems does this solve? Be visceral, not clinical.
- ICP (Ideal Customer Profile): Age, interests, lifestyle, motivations. Be specific — "Gen Z golfer pounding Miller Lites on the course" is better than "male, 18-34, interested in golf"
- Objections to Overcome: Common hesitations from negative reviews
- Tone Assessment: Based on the ICP and product, what tone should the ads take? Options:
- Dark/Emotional: For products solving serious problems (health, insecurity, pain) — lean into fear, urgency, transformation
- Funny/Sharable: For lifestyle products where the ICP buys based on identity and humor — lean into memes, wit, shareability
- Premium/Aspirational: For luxury or aspirational products — lean into aesthetics, exclusivity, identity
- Educational/Trust: For products where the customer needs convincing — lean into social proof, authority, data
Print the full Product Identity Brief to the user before proceeding.
PHASE 2: Competitor Ad Research via Facebook Ads Library
Use the Scrape Creators API to research competitor ads on Facebook/Instagram. The API key is stored in the environment variable SCRAPE_CREATORS_API_KEY.
Step 2a: Search for competitor ads by keyword
Use Bash to call the Scrape Creators API:
curl -s "https://api.scrapecreators.com/v1/facebook/adLibrary/search/ads?query=PRODUCT_KEYWORD&country=US&status=ACTIVE&media_type=IMAGE&sort_by=total_impressions" \
-H "x-api-key: $SCRAPE_CREATORS_API_KEY"
Replace PRODUCT_KEYWORD with relevant search terms for the product (the product name, category, or key benefit).
Step 2b: Analyze the top competitor ads
From the API response, analyze the top 5-10 ads and extract:
- Ad copy patterns: What headlines, hooks, and CTAs are competitors using?
- Visual themes: What imagery styles appear most often?
- Emotional angles: What emotions are competitors targeting?
- Offer structures: Discounts, bundles, urgency tactics?
- What's missing: Gaps or weaknesses in competitor advertising that we can exploit
Print a Competitor Ad Analysis summary to the user before proceeding.
PHASE 3: Ad Strategy & Creative Briefs
Based on Phases 1 and 2, design 4 unique ad variations. But first, internalize these principles:
The Rules of Good Ads
- You have 0.5 seconds. Not 3. If the visual and headline don't stop the scroll instantly, nothing else matters.
- You don't always need to sell. Some ads just need to spark enough curiosity to get the click. Let the landing page do the heavy lifting.
- Speak to ONE person. The best ads make someone feel "this was made for me." Generic = invisible.
- Use their words, not yours. The best headlines come directly from customer reviews, Reddit threads, and real conversations — not from marketing brainstorms. AI won't write you "Made for spitters, not quitters." That comes from understanding the customer.
- Match the tone to the product and ICP. A pregnancy supplement ad should NOT feel like a golf headcover ad. Dark products get dark ads. Funny products get funny ads. Premium products get premium ads. Read the room.
- Features don't sell. Identity and emotion do. "25g protein" means nothing. "The only scoop that replaces your entire supplement shelf" means everything.
- BUILD A VISUAL WORLD, NOT A PRODUCT SHOT. This is the most important rule. Study brands like OLLY, Liquid Death, and Athletic Greens. The best ads don't just photograph a product on a table — they create an entire visual universe around it. OLLY turns boxing gloves into their Sleep product packaging. They shoot POV from INSIDE the jar looking out. They build miniature diorama worlds with tiny people on beaches in front of their product. They drape models over monochromatic geometric sets that match their brand palette. EVERY element in the frame is intentional and part of a cohesive color world. Your ads must have this level of creative ambition — not conventional lifestyle photography.
- MONOCHROMATIC COLOR WORLDS. The most eye-catching ads commit fully to a single bold color palette that matches the product. If the product is purple, the ENTIRE scene is purple — the set, the lighting, the props, the wardrobe. This creates instant visual cohesion and makes the ad unmistakable in a feed of random content. Think: saturated, bold, branded color environments.
- HEADLINES: 3-6 WORDS MAX. The best headlines are punchy, witty, and short enough to read in 0.5 seconds at scroll speed. "Knock Yourself Out." "Snooze button on repeat." "Make Playdates Fun for You, Too." NOT long sentences. NOT full thoughts. Punchy fragments that pair with the visual to create meaning. The headline and image together tell the story — neither should work alone.
- THE PRODUCT MUST BE UNMISSABLE. In every ad, the product itself must be clearly visible, prominent, and rendered with photographic accuracy. But HOW it appears should be creative — integrated into a concept (printed on boxing gloves, floating with fruit, held by a joyful person in matching colors), not just sitting on a countertop.
Creative Type Selection
Based on the Tone Assessment from Phase 1, select 4 creative types from this menu. Each variation MUST use a different creative type and hit at least 2 of the 4 psychological pillars (Attention, Curiosity, Emotion, Connection).
CRITICAL: At least 2 of the 4 variations MUST use a "Visual World" creative type (marked with ★). These are the bold, conceptual, art-directed ads that stop scrolls. Do NOT default to safe lifestyle photography for every variation.
★ Visual World Ads (build an entire branded universe — highest scroll-stopping power):
- The Monochromatic World: Build an entire set/scene in the product's brand color. Everything — background, props, wardrobe, lighting — is one bold, saturated color palette matching the product packaging. The product sits prominently in this world. Think: OLLY's all-purple Sleep ad with the model on geometric stairs. The color commitment alone stops the scroll.
- The Visual Metaphor: Turn the product (or a related object) into a creative metaphor for its benefit. Boxing gloves with the product label = "Knock Yourself Out" for a sleep product. A protein bag as a superhero cape. A collagen tub as a fountain of youth. The concept should be immediately understood in 0.5 seconds and make the viewer smile.
- The Impossible Perspective: Shoot from an unexpected, physically impossible angle that creates wonder. POV from inside the product jar looking out at the customer reaching in. A bird's-eye view of the product creating a swimming pool of its color. Macro close-up where the product towers like a skyscraper. The unusual perspective alone creates curiosity.
- The Miniature/Diorama World: Create a tiny fantasy world around the product. Miniature people sunbathing on a beach in front of the product jar. A tiny hiker climbing the protein bag like a mountain. The product as a building in a tiny city. Whimsical, delightful, and highly sharable.
- The Ingredient Explosion: Product at center with its real ingredients (fruit, vanilla beans, coconut, herbs) exploding outward in a dynamic, floating composition against a bold solid-color background. Motion-frozen at 1/4000s. Vibrant, energetic, immediately communicates "real ingredients."
Curiosity-Based Ads (open the loop, make them click):
- The Curiosity Gap: Provocative headline that creates an open loop. "Your protein powder is missing 6 ingredients." The viewer MUST click to resolve it.
- The Controversial Take: Challenge conventional wisdom. "Everything you know about [category] is wrong."
Emotion-Based Ads (make them feel something):
- The Before/After Transformation: Split-screen showing pain state vs. desired state. Works best for problem-solving products.
- The Dark Hook: Lean into insecurity, fear, or frustration. "Stop blaming yourself for not seeing that positive test." Only for products where the ICP is in emotional pain.
- ★ The Color-Drenched Aspiration: NOT a generic lifestyle shot. Build a fully art-directed scene in the product's color world where a model embodies the aspirational identity. Matching wardrobe, matching set, matching lighting — every pixel is intentional. Think: OLLY's woman in pink robe holding pink product in a pink bathroom. The model radiates genuine joy or confidence, not posed-stock-photo energy.
Connection-Based Ads (make them feel "this is for ME"):
- The ICP Mirror: Show the exact person the ICP sees themselves as, using their product in their world. Must still have bold color commitment and art direction — NOT a generic stock-photo-style lifestyle shot.
- The Meme / Sharable: Funny, relatable, designed to be sent to friends. "The foursome experience you dream about." Increases AOV because people share it.
- The Us vs. Them: Position the product against a clearly inferior alternative. "This vs. that" format.
Trust-Based Ads (prove it works):
- The Social Proof Wall: Reviews, star ratings, customer quotes, "Join X others" framing. Best for bottom-of-funnel.
- The Authority Play: Founder story, expert endorsement, "as seen in" badges, retail availability callouts.
Writing the Briefs
For each of the 4 variations, write a creative brief using this framework (stolen from real agencies doing 8 figures in ad spend):
- Concept: What's the core idea in one sentence? (e.g., "Boxing gloves with the product label printed on them — 'Knock Yourself Out' for a sleep product")
- Creative Type: Which type from the menu above? (Must include at least 2 ★ Visual World types across the 4 variations)
- Psychological Pillars Hit: Which of the 4 pillars does this ad target? (must hit at least 2)
- Angle: Who are you selling to and what's the message? (e.g., "Busy moms who don't have time to blend 8 supplements")
- Headline: MAX 6 WORDS. Punchy, witty, works WITH the visual to create meaning. Study these examples: "Knock Yourself Out." "Snooze button on repeat." "Make Playdates Fun for You, Too." The headline should be a punchy fragment, NOT a complete sentence. It must be instantly readable at scroll speed. Do NOT write long descriptive headlines.
- Body copy: 1-2 SHORT sentences max. This appears as small secondary text. Most of the communication happens through the VISUAL + HEADLINE combo, not body copy. Keep it minimal.
- CTA: Clear, specific, action-oriented. 2-4 words.
- Visual direction: This is the MOST IMPORTANT field — it becomes the image generation prompt. Be extremely specific about:
- The creative concept: What is the bold visual idea? (NOT "product on a table" — think visual metaphors, monochromatic worlds, impossible perspectives, miniature scenes)
- Color world: What is the dominant color palette? Commit to ONE bold saturated color family that matches the product.
- Composition: Where is the product? Where is the headline text? What's the visual hierarchy?
- Art direction details: Set design, props, wardrobe (if applicable), lighting mood
- The feeling: What emotion should someone feel in 0.5 seconds?
- Color palette and mood: Specify the EXACT dominant color (e.g., "saturated warm vanilla/gold #F5DEB3 world" or "bold deep purple #6B3FA0 monochrome"). The entire scene should be drenched in this palette.
Print all 4 creative briefs to the user before proceeding.
PHASE 4: Reference Image Sourcing
Before generating the final ad creatives, you need to gather real reference images from the web to feed into Nano Banana 2 as visual references. This dramatically improves output quality by grounding the AI in real product photography and aesthetic references rather than relying purely on text descriptions.
CRITICAL — Product Image First: The single most important reference image is a high-resolution photo of the ACTUAL PRODUCT. This image will be passed directly to Nano Banana 2 in every single ad generation call so the model can reproduce the product packaging with photographic accuracy. Always search for and download this first, saving it as product-original.png (or .jpg/.webp).
Step 4a: Build a Reference Image Shot List
Review each of the 4 creative briefs from Phase 3 and determine exactly which reference images are needed. For each variation, identify:
- Product shots (REQUIRED) - The actual product from official brand pages, Amazon listings, or retailer sites. Look for the HIGHEST RESOLUTION front-facing product image available. Save as
product-original.{ext}. This image is passed to Nano Banana 2 in EVERY ad generation call.
- Lifestyle/scene references - Photos that match the mood, setting, or composition you want (e.g., a person at a desk for a "work from home" lifestyle ad, a kitchen countertop scene, a gym setting).
- Visual style references - Examples of the aesthetic you're targeting (e.g., a competitor ad with a layout you like, a color palette reference, a typography style example).
- People/demographic references - Photos that represent the target persona (matching age, lifestyle, context) if the ad features people.
Create a shot list like this for each variation:
Variation 1 (Monochromatic World):
- Product hero shot (transparent/white background)
- Art direction reference: monochromatic set design in brand color (e.g., OLLY-style bold color world)
- Color palette/mood reference in the dominant brand color
Variation 2 (Visual Metaphor):
- Product hero shot
- Reference of the metaphor concept (e.g., boxing gloves for "knockout", mountain for "peak performance")
- Bold DTC ad reference with similar conceptual creativity
Variation 3 (Ingredient Explosion):
- Product hero shot
- Reference of floating/exploding product photography (ingredients suspended in air)
- Bold solid-color background reference
Variation 4 (Color-Drenched Lifestyle):
- Product hero shot
- Art-directed lifestyle reference where wardrobe/set matches product color
- Reference ad with strong color commitment (not generic lifestyle photography)
Print the full shot list to the user before proceeding.
Step 4b: Search and Download Reference Images
For each image on the shot list, use the Tavily API to find suitable reference images. The API key is stored in the environment variable TAVILY_API_KEY.
Use Bash to call the Tavily API with include_images enabled:
curl -s -X POST https://api.tavily.com/search \
-H "Authorization: Bearer $TAVILY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "SEARCH_QUERY_HERE",
"include_images": true,
"include_image_descriptions": true,
"max_results": 5
}'
Use search queries like:
"[product name] product photo high resolution" — for the actual product packaging
"[product name] ad campaign creative" — for existing brand advertising
"[brand color] monochromatic set design advertisement" — for color world references
"OLLY supplement ad creative" or "Liquid Death ad campaign" — for art direction inspiration from best-in-class DTC brands
"[visual metaphor concept] commercial photography" — for concept references (e.g., "boxing gloves product photography", "miniature diorama advertisement")
"bold saturated [color] product photography set design" — for color world references
"[competitor brand] ad creative" for competitor style references
From the Tavily response, extract direct image URLs from the images array.
Download each image using Bash with curl:
RUN_ID=${RUN_ID:-$(date +%Y-%m-%d_%H%M%S)}
mkdir -p "./ad-workspace/$RUN_ID/references"
curl -sL "IMAGE_URL" -o "./ad-workspace/$RUN_ID/references/v1-product-hero.jpg"
curl -sL "IMAGE_URL" -o "./ad-workspace/$RUN_ID/references/v1-dramatic-bg.jpg"
curl -sL "IMAGE_URL" -o "./ad-workspace/$RUN_ID/references/v2-product-in-use.jpg"
Naming convention: v{variation_number}-{description}.{ext} (e.g., v1-product-hero.jpg, v3-before-state.jpg, v4-lifestyle-scene.jpg)
Target: Aim for 2-3 reference images per variation (8-12 total). Nano Banana supports up to 14 reference images per generation.
Step 4c: Validate Downloaded Images
After downloading, verify each image was successfully retrieved:
ls -la "./ad-workspace/$RUN_ID/references/"
Remove any failed downloads (0 bytes or HTML error pages). Re-search and re-download replacements for any that failed.
Print a summary of all successfully downloaded reference images to the user before proceeding.
PHASE 5: Generate Ad Creatives with Nano Banana 2
Generate all 4 ad images using the Gemini API (Nano Banana 2 — model: gemini-3.1-flash-image-preview). The API key is stored in the environment variable GEMINI_API_KEY.
First, create today's output folder with a timestamped subfolder (if not already created in Phase 4). Each generation run gets its own folder so the user can click through and see which ads were created when:
RUN_ID=$(date +%Y-%m-%d_%H%M%S)
mkdir -p "./ad-workspace/$RUN_ID"
mkdir -p "./ad-workspace/$RUN_ID/references"
Use $RUN_ID for ALL file paths in this phase (images, campaign brief, etc).
CRITICAL: Always Pass the Product Image Directly
For EVERY ad variation, the actual product image (the highest-resolution product photo downloaded in Phase 4) MUST be included as the first inlineData reference image in every API call. This ensures Nano Banana 2 reproduces the real product packaging with photographic accuracy rather than hallucinating the product appearance.
In your prompt, explicitly tell the model:
"REFERENCE IMAGE 1: This is the ACTUAL [product name] product. You MUST reproduce this exact product packaging in the final image with photographic accuracy — match every detail of the packaging, branding, colors, text, and logos exactly as shown."
Additional style/composition reference images should follow as REFERENCE IMAGE 2, 3, etc.
Photorealistic Prompt Engineering Guidelines
Nano Banana 2 responds best to narrative, scene-directed prompts — not keyword lists. Write prompts as if you are a creative director briefing an art director and photographer for a $50K ad shoot. Follow these rules:
The #1 Rule: ART DIRECTION OVER PHOTOGRAPHY
The biggest difference between forgettable ads and scroll-stopping ads is ART DIRECTION. Don't just describe a photo — describe a constructed visual world. Before writing any prompt, answer these questions:
- What is the bold creative concept? (Not "product on table" — think "product AS something unexpected" or "product IN an impossible world")
- What is the dominant color that will drench the entire scene?
- What makes this image impossible to scroll past?
- Would a creative director at a top DTC agency approve this, or would they say "too safe, too generic"?
Prompt Structure (follow this order):
-
Role-set the model: Start with "You are a world-class advertising art director and commercial photographer creating a bold, conceptual [type] advertisement for [brand]. This is a high-budget campaign shoot with full set design, styling, and art direction."
-
Describe the CONCEPT first, not the camera: Lead with the creative idea. "The concept: the product jar has been transformed into a pair of boxing gloves" or "The concept: we've built an entire monochromatic vanilla-gold world — the set, the props, the model's wardrobe are all the same warm golden vanilla tone."
-
Commit to a COLOR WORLD: Be extremely specific and forceful about color:
- "The ENTIRE scene is drenched in saturated [color]. The background, the props, the lighting, the wardrobe — everything exists in a [color] universe."
- "The only contrast comes from the product packaging itself and the white headline text."
- Name specific hex values or Pantone-style references when helpful.
-
Specify camera and lens (to control the photographic quality):
- Product/concept shots: "Canon EOS R5 with 100mm macro lens at f/2.8"
- Lifestyle/set: "Fujifilm GFX 100S with 80mm f/1.7" or "Hasselblad medium format with 80mm"
- Wide set scenes: "Sony A7III with 35mm wide-angle at f/5.6"
- Portraits: "Nikon Z9 with 85mm f/1.4"
-
Describe lighting as MOOD, not just technical specs:
- "Soft, diffused studio lighting that makes everything feel clean and premium — like an Apple product shot"
- "Dramatic side-lighting with deep shadows creating a moody, editorial feel"
- "Bright, even, punchy lighting — like a fashion editorial in Vogue"
- Include color temperature and direction when relevant.
-
Demand hyperreal textures: Explicitly request micro-detail:
- "You can see individual pores on the skin"
- "Visible grain of the vanilla bean, fiber of the coconut"
- "Water droplets with realistic light refraction"
- "The product label text is crisp and fully legible"
-
Direct human subjects like a CASTING DIRECTOR and WARDROBE STYLIST:
- Specify wardrobe IN THE COLOR WORLD: "She wears a [product-matching color] oversized knit sweater"
- Specify genuine emotion, not poses: "mid-laugh with eyes crinkled, not a forced model smile"
- Specify diversity when appropriate
-
TEXT OVERLAY INSTRUCTIONS — BE EXTREMELY SPECIFIC:
- Specify exact text content, font style, size relative to the image, color, and position
- "HEADLINE at the top of the image in large, bold, white sans-serif (like Helvetica Neue Black or Futura Bold): '[exact text]' — this text should be the FIRST thing the eye sees"
- "SUBTEXT at the bottom in smaller, lighter weight sans-serif: '[exact text]'"
- "TEXT MUST BE CRISP, PERFECTLY LEGIBLE, AND SPELLED CORRECTLY"
- Always specify text color that has HIGH CONTRAST against the background (white text on dark/saturated backgrounds, dark text on light backgrounds)
-
Label reference images explicitly: For each inlineData image:
- "REFERENCE IMAGE 1: This is the ACTUAL product — reproduce this exact packaging with photographic accuracy"
- "REFERENCE IMAGE 2: This shows the art direction style/color world I want"
-
Specify the FINAL AD LAYOUT: Describe where every element goes:
- "Top third: headline text. Center: the creative visual. Bottom: small subtext and CTA."
- "Product occupies the right third of the frame. The left two-thirds is the model/scene."
- This prevents the model from generating a random composition.
-
End with an anti-generic directive: Close every prompt with: "This should NOT look like a generic stock photo or a basic product-on-table shot. It should look like a bold, award-winning advertising campaign — the kind of ad that makes someone stop scrolling, screenshot it, and send it to a friend."
API Call Pattern
For each variation, use a Python script via Bash to call the API with the product image + style references as inline data:
import json, urllib.request, base64, ssl, os
api_key = os.environ['GEMINI_API_KEY']
ctx = ssl.create_default_context()
def load_ref(path):
with open(path, 'rb') as f:
return base64.b64encode(f.read()).decode()
product = load_ref(f'./ad-workspace/{run_id}/references/product-original.png')
style_ref = load_ref(f'./ad-workspace/{run_id}/references/v1-style-ref.jpg')
prompt = """YOUR PHOTOREALISTIC PROMPT HERE"""
payload = json.dumps({
'contents': [{'parts': [
{'text': prompt},
{'inlineData': {'mimeType': 'image/png', 'data': product}},
{'inlineData': {'mimeType': 'image/jpeg', 'data': style_ref}}
]}],
'generationConfig': {'responseModalities': ['TEXT', 'IMAGE'], 'imageConfig': {'aspectRatio': '1:1'}}
}).encode()
url = f'https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent?key={api_key}'
req = urllib.request.Request(url, data=payload, headers={'Content-Type': 'application/json'})
resp = urllib.request.urlopen(req, timeout=180, context=ctx)
data = json.loads(resp.read())
for part in data.get('candidates', [{}])[0].get('content', {}).get('parts', []):
if 'inlineData' in part:
img = base64.b64decode(part['inlineData']['data'])
with open('OUTPUT_PATH', 'wb') as f:
f.write(img)
print(f'Image saved: {len(img)} bytes')
elif 'text' in part:
print(part['text'][:300])
Repeat this pattern for each variation, swapping in that variation's style reference images and prompt. The product image MUST be included in every single call.
File Naming Convention
Save files using the $RUN_ID folder:
./ad-workspace/$RUN_ID/ad-1-[concept-slug].png
./ad-workspace/$RUN_ID/ad-2-[concept-slug].png
./ad-workspace/$RUN_ID/ad-3-[concept-slug].png
./ad-workspace/$RUN_ID/ad-4-[concept-slug].png
Example: ./ad-workspace/2026-03-28_143022/ad-1-shelf-swap.png
PHASE 6: Final Deliverables
After generating all 4 images, create a summary markdown file at ./ad-workspace/$RUN_ID/campaign-brief.md containing:
- Product Identity Brief (from Phase 1 — include the ICP profile and tone assessment)
- Competitor Analysis (from Phase 2)
- Creative Briefs for all 4 variations (from Phase 3 — include concept, creative type, angle, pillars hit)
- File paths to all generated images
- Funnel Stage Recommendations: Which ad belongs where in the funnel?
- TOF (Top of Funnel): For cold audiences who've never heard of the brand — ads focused on attention + curiosity
- MOF (Middle of Funnel): For warm audiences who are problem-aware — ads focused on education + desire
- BOF (Bottom of Funnel): For hot audiences ready to buy — ads focused on social proof + offers + urgency
- Recommended A/B testing strategy: Which variation to test first and why. Include specific metrics to watch (CTR for scroll-stopping power, CPA for conversion efficiency, ROAS for overall success).
- Suggested ad copy for each platform: Facebook (long-form storytelling), Instagram (concise + visual), TikTok (conversational, POV format, meme-adjacent)
Print a final summary to the user showing:
- All generated file paths
- A quick recommendation on which ad to test first
- Which ads to use at each funnel stage
- Next steps for launching
IMPORTANT NOTES
- If
SCRAPE_CREATORS_API_KEY is not set, warn the user and skip Phase 2. Use web research to fill the gap.
- If
GEMINI_API_KEY is not set, warn the user that images cannot be generated. Still complete Phases 1-3 and save the creative briefs.
- If
TAVILY_API_KEY is not set, fall back to WebSearch for reference image sourcing.
- Always try
python3 first for base64 decoding. If not available, try python.
Creative Philosophy (non-negotiable)
- Generic = death. If an ad could work for any product in the category, it's a bad ad. Every ad must feel specifically made for THIS product and THIS customer.
- Steal from customers, not competitors. The best headlines, hooks, and copy come from real customer language — Reddit threads, Amazon reviews, TikTok comments, ad comments. If you're just rewording competitor ads, you'll blend in and lose.
- 0.5 seconds or bust. Every visual and headline must stop the scroll instantly. If you have to read a paragraph to understand the ad, it's failed.
- Match the vibe. A pregnancy supplement ad should feel NOTHING like a golf headcover ad. Dark products get dark ads (fear, insecurity, transformation). Lifestyle products get funny/sharable ads (memes, humor, identity). Premium products get aspirational ads (luxury, exclusivity). Read the ICP and match the tone.
- Don't list features — invoke identity. "25g protein, 10g collagen, adaptogens" is a spec sheet. "The only scoop that replaced my entire supplement shelf" is an ad. Nobody cares about your ingredients. They care about what it does for THEM.
- Each variation must feel like a completely different creative team made it. Different tone, different visual style, different psychological angle. If all 4 ads feel similar, you've failed.
- The best ads are sharable. Ask yourself: would someone screenshot this and send it to a friend? If yes, you've won. If not, push harder on the humor, the provocation, or the relatability.
- Curiosity > selling. Not every ad needs to close the sale. Some ads just need to open the loop — spark enough curiosity that they HAVE to click. Let the landing page or funnel do the rest.
- BUILD VISUAL WORLDS, NOT PRODUCT SHOTS. This is the #1 differentiator between amateur and professional ads. Study OLLY, Liquid Death, Athletic Greens, Glossier. The best DTC brands don't photograph products on countertops — they construct entire color-drenched universes. Monochromatic sets where every prop matches the brand color. Visual metaphors where the product becomes something unexpected. Impossible camera perspectives. Miniature fantasy worlds. If your ad looks like it could have been taken with an iPhone in someone's kitchen, you've failed. It should look like it was art-directed by a team that spent $50K on set design.
- HEADLINES: PUNCHY, SHORT, WITTY. Max 6 words. "Knock Yourself Out." "Snooze button on repeat." "Your gut called. We answered." NOT full sentences. NOT marketing copy. Punchy fragments that ONLY work when paired with the visual. The headline + image together tell the complete story — neither should fully make sense alone.
- TEXT MUST BE LEGIBLE. Every piece of text in the ad — headline, subtext, CTA — must be crisp, correctly spelled, and easily readable at mobile phone size. Use high-contrast text colors (white on saturated colors, dark on light backgrounds). If the text isn't instantly legible, the ad fails.