How to Auto-Generate Marketing Visuals with AI: 4 Workflows That Replace Manual Design

Build an automated pipeline to generate marketing visuals with AI. Step-by-step guides for social media posts, ad creatives, product photos, and scheduled content calendars. Uses AnyCap CLI — no designer bottleneck.

by AnyCap

Automated marketing visual pipeline with AI-generated social posts, ad creatives, product photos, and blog headers flowing from a central AI core

Marketing teams need a lot of visuals. Social media posts (daily). Ad creatives (per campaign). Product photos (per SKU). Blog hero images (per article). Email headers. Landing page illustrations. Conference badges. The list never ends.

Most teams handle this the hard way: designer makes a template → marketer fills it in manually → repeat 100 times. Or worse: marketer types prompts into Midjourney one at a time, downloads results, renames files, uploads to the CMS.

There's a better way. You can build an automated pipeline that generates marketing visuals on demand — triggered by a spreadsheet update, a calendar event, or a CLI command. No designer bottleneck. No manual prompt-typing. No file-renaming drudgery.

This guide shows you how. We'll build four automation workflows, from beginner (one command) to advanced (scheduled batch pipeline), all using AnyCap's image generation CLI. Whether you use Claude Code, Cursor, n8n, Zapier, or plain cron — there's a path here for you.


Why Automate Marketing Visual Generation?

Before we write code, let's be clear about what we're automating:

Manual Workflow Automated Workflow
Open Midjourney → type prompt → wait → download → rename → upload One CLI command or cron job
Designer creates 1 variant → marketer requests 5 more → wait 2 days Generate 20 variants in 60 seconds
50 product photos = 50 individual prompts One CSV → 50 images in batch
A/B test creative refresh = manual redesign Scheduled regeneration with new prompts

The time savings compound quickly. A social media manager posting 3x/day across 4 platforms saves 6-10 hours/week. An e-commerce team with 200 SKUs saves 40+ hours per product photo refresh. A performance marketing team running 20 ad variants per campaign eliminates the creative bottleneck entirely.


What You Need

  • AnyCap CLI installed and authenticated: npm install -g anycap && anycap login
  • A prompt template library (we'll build one below)
  • Optional: n8n, Zapier, or cron for scheduling

Workflow 1: One-Command Social Media Posts

The simplest workflow: generate a week of social media visuals with one command.

Step 1: Build your prompt template

Create a file called social-prompts.txt:

Monday Motivation: minimalist office desk with morning sunlight, warm tones, motivational quote space at top, 1080x1080, clean modern aesthetic
Industry Tip Tuesday: close-up of hands typing on mechanical keyboard, blue ambient lighting, text overlay area on right, 1080x1080, tech blog style
Behind-the-Scenes Wednesday: candid team photo style, open-plan office, natural expression, warm lighting, 1080x1080, authentic feel
Throwback Thursday: vintage film grain, retro computer setup, warm sepia tones, 1080x1080, nostalgic tech
Feature Friday: hero product shot, dramatic studio lighting, dark background, product spotlight, 1080x1080, premium commercial look

Step 2: Generate the batch

#!/bin/bash
# generate-social-week.sh — Generate 5 days of social media visuals

while IFS=: read -r day prompt; do
  echo "Generating $day..."
  anycap image generate \
    --prompt "$prompt" \
    --model seedream-5 \
    -o "social-media/${day// /-}.png"
done < social-prompts.txt

echo "Done! Check social-media/ folder."

Step 3: Make it repeatable

chmod +x generate-social-week.sh
./generate-social-week.sh

That's it. One command, five platform-ready images. Run it weekly, tweak the prompt file when you want new styles.


Workflow 2: Ad Creative Variants for A/B Testing

Performance marketers know: you need at least 5-10 variants per ad set to find what works. Here's how to generate them programmatically.

Step 1: Define your variant matrix

# ad_variants.py
import subprocess, json, itertools

headlines = [
    "Save 50% today",
    "Free trial — no credit card",
    "Join 10,000+ teams",
    "Built for speed",
]
visuals = [
    "product hero shot on gradient background, modern SaaS aesthetic, 1200x628",
    "happy team collaborating in modern office, natural light, 1200x628",
    "dashboard screenshot with impressive metrics, clean UI, 1200x628",
    "minimalist illustration showing workflow improvement, 1200x628",
]
ctas = [
    "with a bright orange CTA button",
    "with a sleek blue 'Start Free' button",
    "",  # no button variant
]

for i, (headline, visual, cta) in enumerate(itertools.product(headlines, visuals, ctas)):
    prompt = f"Facebook ad creative: {visual}. Overlay text: '{headline}' {cta}. Professional, high-contrast, eye-catching."
    
    result = subprocess.run([
        "anycap", "image", "generate",
        "--prompt", prompt,
        "--model", "nano-banana-2",
        "-o", f"ad-variants/variant-{i:03d}.png"
    ], capture_output=True, text=True)
    
    print(f"Variant {i:03d}: {headline}")

Step 2: Run and review

python ad_variants.py
# Generates up to 48 variants (4 headlines × 4 visuals × 3 CTA options)

In 2 minutes, you have 48 ad variants ready for review. Pick the best 10, upload to your ad platform, and let the A/B test run.


Workflow 3: Product Photo Pipeline (E-Commerce)

If you have 200 SKUs needing consistent product photos, this is the workflow that replaces $10,000+ in photoshoot costs.

Step 1: Prepare your product CSV

sku,product_name,category,color,style
TSH-001,Classic Crew Tee,Apparel,White,Studio on model
TSH-002,Classic Crew Tee,Apparel,Black,Studio on model
TSH-003,Classic Crew Tee,Apparel,Navy,Studio on model
BAG-001,Leather Tote,Accessories,Brown,Flat lay on marble
BAG-002,Leather Tote,Accessories,Black,Flat lay on marble

Step 2: Build the pipeline script

# product-photos.py
import csv, subprocess, json

PROMPT_TEMPLATES = {
    "Studio on model": "Professional e-commerce product photo: {product_name} in {color}, worn by model, studio lighting, white seamless background, front view, 1024x1024, high-end fashion catalog quality",
    "Flat lay on marble": "Professional e-commerce flat lay: {product_name} in {color}, arranged on white marble surface, natural light from window, top-down angle, 1024x1024, premium lifestyle catalog",
}

with open("products.csv") as f:
    for row in csv.DictReader(f):
        template = PROMPT_TEMPLATES.get(row["style"], PROMPT_TEMPLATES["Studio on model"])
        prompt = template.format(**row)
        
        result = subprocess.run([
            "anycap", "image", "generate",
            "--prompt", prompt,
            "--model", "nano-banana-2",
            "--async",
            "-o", f"product-photos/{row['sku']}.png"
        ], capture_output=True, text=True)
        
        print(f"Queued: {row['sku']} — {row['product_name']} ({row['color']})")

print("\nAll SKUs queued. Check product-photos/ for results.")

Step 3: Scale it

python product-photos.py
# 200 SKUs in ~3 minutes, async mode

The async mode means AnyCap processes images in parallel. 200 product photos in 2-3 minutes, all with consistent lighting, angles, and quality — something that would take a photography studio 3-5 days and cost $5,000-15,000.


Workflow 4: Scheduled Content Calendar with n8n

For teams that want fully hands-off automation, integrate AnyCap with a workflow automation tool.

n8n workflow structure

[Schedule Trigger: Every Monday 8 AM]
  → [Read airtable/google sheets: this week's content]
  → [Loop over each content item]
    → [Execute Command: anycap image generate --prompt "{{prompt}}" --model seedream-5]
    → [Upload to Google Drive / S3]
    → [Post to Slack: "Visual ready: {{title}}"]

The Execute Command node config

{
  "command": "anycap image generate --prompt \"={{ $json.prompt }}\" --model seedream-5 -o /output/{{ $json.slug }}.png"
}

This gives you a content calendar → visual generation pipeline with zero manual steps. Airtable row updated → image generated → uploaded → team notified.

Zapier alternative

If you prefer Zapier, use the Code by Zapier step:

const { execSync } = require('child_process');

const prompt = inputData.prompt;
const slug = inputData.slug;

execSync(`anycap image generate --prompt "${prompt}" --model seedream-5 -o /tmp/${slug}.png`);

return { image_path: `/tmp/${slug}.png` };

Prompt Templates for Marketing Visuals

Save these. Use them. Tweak them for your brand.

Social Media Posts

# Instagram Post (1080x1080)
{subject}, vibrant colors, modern aesthetic, natural lighting, 
1080x1080, lifestyle photography style

# LinkedIn Post (1200x627)
{subject}, professional setting, clean background, 
warm ambient light, 1200x627, editorial photography

# Story / Reel Cover (1080x1920)
{subject}, vertical composition, bold colors, 
eye-catching focal point, 1080x1920, story format

Ad Creatives

# Facebook/Instagram Ad (1200x628)
{product} hero shot, {background}, {headline} text overlay, 
high contrast, professional ad creative, 1200x628

# Display Ad (300x250)
{product}, clean composition, strong CTA area, 
300x250, banner ad format

# LinkedIn Ad (1200x627)
{product} in professional setting, subtle brand colors, 
1200x627, B2B ad creative

Blog & Content

# Blog Hero Image (1200x630)
{article topic}, conceptual illustration, 
{color palette} tones, 1200x630, editorial blog hero

# Email Header (600x200)
{subject}, horizontal composition, light background, 
600x200, email header format

Product Photos

# Studio Product Shot
{product_name} in {color}, studio lighting, 
white seamless background, front three-quarter view, 
1024x1024, commercial product photography

# Lifestyle Product Shot  
{product_name} in {color}, {scene}, natural light,
1024x1024, lifestyle catalog photography

Choosing the Right Model for Marketing Visuals

Not every marketing visual needs the same model. Here's how to choose:

Use Case Model Why
Hero images, key campaign visuals Seedream 5 Best first-pass quality, polished output
Ad variants, A/B test creatives Nano Banana 2 Fastest, cheapest — generate 50 variants without budget concern
Product photo revisions, background swaps Nano Banana Pro Image-to-image editing for fine-tuning
Social media daily posts Nano Banana 2 Speed matters more than perfection for daily content
Premium campaign launch assets Seedream 5 Quality over speed for high-visibility assets

Cost Breakdown: Automated vs. Manual

Let's compare a typical month for a mid-sized marketing team:

Method 200 Images/Month Turnaround Consistency
In-house designer $3,000-5,000 (salary allocation) 2-5 days per batch High
Freelance designer $2,000-4,000 ($10-20/image) 3-7 days per batch Medium
Stock photos $200-500 ($1-3/image) Instant Low (generic)
AnyCap (Nano Banana 2) $10-20 (~$0.05-0.10/image) 2-3 minutes High (prompt-controlled)
AnyCap (Seedream 5) $30-60 (~$0.15-0.30/image) 5-8 minutes Highest

The automated pipeline doesn't just save money — it changes what's possible. You can generate 50 ad variants for a campaign in 2 minutes. You can refresh product photos seasonally without a photoshoot. You can A/B test 8 different hero images for every blog post. These things weren't practical before.


FAQ

Can I use this for commercial marketing?

Yes. AnyCap's image generation models (Seedream 5, Nano Banana Pro, Nano Banana 2) all support commercial use. Always check the terms for the specific model you're using.

How do I maintain brand consistency across generated images?

Build a brand template into your prompts. Include your color palette ("brand colors: navy #1a2b3c, coral #ff6b6b"), your visual style ("clean, minimalist, uncluttered"), and reference your existing brand assets when using image-to-image mode.

What if my prompt produces inconsistent results?

That's what batch mode is for. Generate 10-20 variants per prompt, pick the best one. Over time, you'll learn which prompt patterns produce consistent results for your brand. Save the winners as templates.

Can this integrate with my CMS?

Yes. Add a step after image generation that uploads to your CMS via its API. In the n8n workflow above, swap "Upload to Google Drive" for "POST to WordPress/Contentful/Webflow API."

Do I need to be a developer to set this up?

For the CLI workflows (1-3), you need basic terminal comfort — the scripts are provided, you just run them. For the n8n/Zapier workflow (4), no coding is required — it's visual drag-and-drop. If you use Claude Code or Cursor, tell your agent: "Set up an automated marketing visual pipeline using AnyCap" and it'll handle the scripting.


Next Step: Your First Automated Pipeline

Pick the workflow that matches your biggest pain point:

  1. Social media drowning you? → Start with Workflow 1 (one command, one week of posts)
  2. Ad creative bottleneck? → Start with Workflow 2 (48 variants in 2 minutes)
  3. Product photos backlog? → Start with Workflow 3 (200 SKUs in 3 minutes)
  4. Want fully hands-off? → Start with Workflow 4 (n8n scheduled pipeline)

Install AnyCap, copy the script for your workflow, and run it. The first time takes 10 minutes. Every time after that takes 30 seconds.


Last updated: May 2026. AnyCap model availability and pricing subject to change.