How to Auto-Generate Product Videos for E-Commerce with Codex

Codex can read your product catalog and batch-generate short product videos at scale using AnyCap and Seedance 2. Here's the exact pipeline — from CSV to published video — without manual production work.

by AnyCap

Manual product video production does not scale. A catalog of 500 SKUs means 500 individual production jobs — or it means using Codex to automate the whole pipeline.

This page covers how to use Codex to read your product catalog, generate a video for each product, and organize the outputs — all in a single session, without a production team.

If you have not set up video generation in Codex yet, start with How to Generate Video with Codex.


Codex batch product video pipeline — auto-generate e-commerce videos from product catalog at scale

Why Codex + video makes sense for e-commerce

Product videos drive conversion. Studies consistently show that shoppers who watch a product video are more likely to add to cart — and short AI-generated clips are now good enough to move the needle.

The business case for automation is simple: a catalog of 500 SKUs needs 500 videos. A production team cannot do that economically. A Codex session running AnyCap can.

AI auto-generated e-commerce product video — perfume bottle with metrics overlay

The pipeline

The full pipeline has four steps — from reading your catalog data to publishing the output:

  1. Read product data — Codex reads your CSV, JSON, or API output for each SKU
  2. Generate video prompt — constructs a tailored AnyCap prompt from product name, category, and description
  3. Generate video — AnyCap's Seedance 2 renders a short product clip for each SKU
  4. Upload and organize — AnyCap Drive stores outputs, named and organized by SKU

E-commerce video automation workflow — Product Brief to Codex to AI Generation to Published Listing

import csv, subprocess

with open('products.csv', 'r') as f:
    reader = csv.DictReader(f)
    for row in reader:
        prompt = f"short product showcase video for {row['name']}, {row['category']}, clean white background, smooth 360 rotation, professional e-commerce lighting"
        subprocess.run([
            "anycap", "video", "generate",
            "--prompt", prompt,
            "--model", "seedance-2",
            "-o", f"videos/{row['sku']}-product-video.mp4"
        ])

Choosing the right model

For e-commerce product video automation, Seedance 2 is the right default — consistent output quality across large batch runs, reliable enough to automate without per-clip review.

Use case Best model Why
Standard catalog (100+ SKUs) Seedance 2 Consistent quality, reliable batch behavior
Prompt testing on new catalog Seedance 2 Fast Fast feedback before committing to full render
Hero or featured products Kling 3 Cinematic treatment, longer clips
Product photo animation Kling 3 i2v Naturalistic motion from still images
Premium lifestyle content Veo 3.1 Highest single-pass quality

Building the prompt template

A well-constructed prompt template is what keeps batch output consistent across hundreds of SKUs. The function below builds a clean, production-grade prompt from any product row:

def build_product_prompt(row):
    return (
        f"professional product video for {row['name']}, {row['category']}, "
        "clean white background, smooth motion, e-commerce production quality, "
        "no text overlays, 6-second duration"
    )

Running the full catalog

For large catalogs, add skip logic and progress tracking so the pipeline can resume if interrupted. The loop below handles any catalog size with rate limiting built in:

import csv, subprocess, os, time

os.makedirs("videos", exist_ok=True)
with open('products.csv') as f:
    products = list(csv.DictReader(f))

for i, row in enumerate(products):
    sku = row['sku']
    output = f"videos/{sku}-product-video.mp4"
    if os.path.exists(output):
        continue  # skip existing
    result = subprocess.run([
        "anycap", "video", "generate",
        "--prompt", build_product_prompt(row),
        "--model", "seedance-2", "-o", output
    ], capture_output=True)
    print(f"[{i+1}/{len(products)}] {sku} — {'done' if result.returncode == 0 else 'ERROR'}")
    time.sleep(1)

Storing and sharing outputs

Once generation is complete, upload the full output folder to AnyCap Drive with a single command. From there, videos can be linked directly in your CMS by SKU.

anycap drive upload videos/ --folder "product-videos-2026-Q3"

The video below shows a complete catalog run in a live Codex session — prompt construction, batch generation, and Drive upload in sequence.


FAQ

Can Codex read from a database or API? Yes — replace the CSV reader with your data source.

What length works best for product videos? 6–8 seconds for standard clips. Switch to Kling 3 for 10–15 second lifestyle videos.

How many videos can Codex generate in one session? As many as your catalog has. The loop scales to any size with rate limiting and skip logic.

The bottom line

If you have a product catalog and no product videos, the fastest path is a Codex session with AnyCap — not a production team. Set up the prompt template once, run the pipeline across your SKUs, and store the outputs in Drive for CMS integration.

Add video generation to Codex — install AnyCap, free to start