> ## Documentation Index
> Fetch the complete documentation index at: https://heygen-1fa696a7.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# E-commerce Product Videos

> Turn product catalogs into avatar-led e-commerce videos via the HeyGen API. One video per SKU, automatically refreshed when prices, photos, or copy change.

## The Problem

Product pages with video significantly outperform those without — higher engagement, longer time on page, and better conversion rates. But with thousands of SKUs, creating individual product videos is impossible with traditional production. Most e-commerce stores have great product images but zero product video.

## How It Works

```
Product catalog (name, description, images) → Prompt per product → Batch generate → Embed on product pages
```

Your product database already has everything Video Agent needs: name, description, features, and images. Turn that structured data into video at scale.

## Build It

<Steps>
  <Step title="Pull product data">
    ```python theme={null}
    # From your catalog API, database, or CSV
    products = [
        {
            "name": "CloudWalk Pro Running Shoes",
            "category": "Footwear",
            "price": "$129",
            "description": "Lightweight performance running shoe with responsive foam midsole and breathable knit upper.",
            "features": [
                "ResponsiveFoam midsole — 30% more energy return",
                "Breathable knit upper — keeps feet cool on long runs",
                "Carbon fiber plate — propels you forward",
                "Only 7.2 oz — one of the lightest in its class",
            ],
            "images": [
                "https://cdn.store.com/products/cloudwalk-hero.jpg",
                "https://cdn.store.com/products/cloudwalk-side.jpg",
                "https://cdn.store.com/products/cloudwalk-sole.jpg",
            ],
        },
        # ... hundreds more
    ]
    ```
  </Step>

  <Step title="Build category-aware prompts">
    Consider using different video styles for different product categories. For example, fashion might benefit from energy and aspiration, while electronics might call for clarity and specs.

    ```python theme={null}
    CATEGORY_STYLES = {
        "Footwear": {
            "tone": "energetic and aspirational, like a Nike ad",
            "focus": "performance benefits, how it feels, lifestyle context",
            "duration": "20 seconds",
        },
        "Electronics": {
            "tone": "clear, knowledgeable, like a trusted tech reviewer",
            "focus": "specs that matter, real-world use cases, comparisons",
            "duration": "30 seconds",
        },
        "Home & Kitchen": {
            "tone": "warm, practical, like a friend recommending a product",
            "focus": "solving everyday problems, quality materials, ease of use",
            "duration": "25 seconds",
        },
    }

    def build_product_prompt(product):
        style = CATEGORY_STYLES.get(product["category"], CATEGORY_STYLES["Electronics"])
        features = "\n".join(f"- {f}" for f in product["features"])

        return f"""Create a {style['duration']} product video for {product['name']}.

    Product: {product['name']} — {product['price']}
    {product['description']}

    Key features:
    {features}

    Video structure:
    - Hook (3s): Bold statement about the key benefit
    - Features (70% of duration): Walk through 2-3 standout features
      with text overlays. Reference the attached product images.
    - CTA (3s): "Available now for {product['price']}"

    Tone: {style['tone']}
    Focus on: {style['focus']}
    Use the attached product images as visual reference.
    """
    ```
  </Step>

  <Step title="Batch generate with rate limiting">
    ```python theme={null}
    import requests
    import time

    video_jobs = []

    for product in products:
        prompt = build_product_prompt(product)
        files = [{"type": "url", "url": img} for img in product["images"][:5]]

        resp = requests.post(
            "https://api.heygen.com/v3/video-agents",
            headers={
                "X-Api-Key": HEYGEN_API_KEY,
                "Content-Type": "application/json",
            },
            json={"prompt": prompt, "files": files},
        )
        video_jobs.append({
            "product_id": product["name"],
            "video_id": resp.json()["data"]["video_id"],
        })
        time.sleep(5)

    print(f"Submitted {len(video_jobs)} product videos")
    ```

    Then poll for completion and match video URLs back to product IDs.
  </Step>

  <Step title="Embed on product pages">
    Once rendered, add video URLs to your product data and display on your store.

    ```python theme={null}
    # After polling all videos to completion:
    for job in video_jobs:
        update_product_page(
            product_id=job["product_id"],
            video_url=job["video_url"],
            thumbnail_url=job["thumbnail_url"],
        )
    ```
  </Step>
</Steps>

## Video Types by Use Case

| Video type               | Duration | When to use                              |
| ------------------------ | -------- | ---------------------------------------- |
| **Product showcase**     | 15–30s   | Product listing page — show key features |
| **How-to-use**           | 30–60s   | Complex products — demonstrate usage     |
| **Comparison**           | 30–45s   | "Pro vs Standard" — help buyers choose   |
| **Unboxing/first look**  | 20–30s   | New arrivals — build excitement          |
| **Customer testimonial** | 30s      | Social proof — pair with review text     |

## Scaling to Thousands of Products

For large catalogs, consider prioritizing by business impact:

1. **Top sellers first** — highest traffic pages get the most ROI from video
2. **High-margin products** — the conversion lift matters most here
3. **New arrivals** — video helps customers understand unfamiliar products
4. **Products with high return rates** — better video = more informed purchases = fewer returns

```python theme={null}
# Prioritize by revenue impact
products.sort(key=lambda p: p["monthly_revenue"], reverse=True)
top_products = products[:100]  # Start with top 100
```

## A/B Testing

Generate multiple video styles for the same product and measure which converts better:

```python theme={null}
variants = [
    {"style": "presenter explaining features", "label": "explainer"},
    {"style": "fast-paced montage with text overlays only", "label": "montage"},
    {"style": "customer testimonial style, first-person", "label": "testimonial"},
]
```

## Variations

* **Seasonal campaigns:** Regenerate product videos with holiday-themed prompts
* **Multi-language:** Translate for international storefronts using [Video Translation](/cookbook/video-agent/multilingual-content)
* **Social ads:** Generate portrait (9:16) versions for social media advertising
* **Bundle videos:** Combine multiple products into "complete the look" or "bundle" showcase videos

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Real Estate Listings" icon="house" href="/cookbook/video-agent/real-estate-listings">
    Same catalog-to-video pattern, applied to properties.
  </Card>

  <Card title="Social Media Pipeline" icon="share-nodes" href="/cookbook/video-agent/social-media-pipeline">
    Distribute product videos across social platforms.
  </Card>
</CardGroup>
