AI Video Generation API for E-commerce — Product Demos at Scale 2026
Your visual merchandising team needs 500 product demo clips for a catalog refresh. Each video: five seconds, 720p, one product per clip. At a production studio, that's weeks of scheduling and a five-figure budget. Via an AI video generation API, the same batch runs overnight for under $100.
This guide covers model selection for e-commerce video use cases, the concrete API calls to generate product demos and image-based animations, async polling for batch workloads, and cost math across three volume tiers.
Which AI video model fits which e-commerce use case?
Four models are available on GenRelay for video generation. The right choice depends on whether you're starting from a text prompt or an existing product image, and how much visual fidelity matters.
| Use case | Recommended model | Billing | Cost per 5s clip |
|---|---|---|---|
| Lifestyle scene from product description | Veo 3.1 Lite (t2v) | Per second | $0.30 (720p) / $0.60 (1080p) |
| Animate product image (float, zoom, rotate) | Grok Imagine 1.5 (i2v) | Per second | $0.11 (any resolution) |
| Animate product image — premium fidelity | Veo 3.1 i2v | Per second | $0.30 (720p) |
| High-volume catalog, cost-first | Grok Imagine 1.0 (t2v) | Per second | $0.05 |
| Predictable per-clip budget | Omni Flash | Per generation | $0.10 (720p) / $0.15 (1080p) |
For most catalog-scale automation, the choice comes down to Grok 1.0 for cost-first workloads and Veo 3.1 Lite for quality-first hero content.
How do I generate a product lifestyle video from a text prompt?
Veo 3.1 Lite text-to-video accepts a prompt and duration (in seconds). The job is asynchronous — submit, receive a job ID, then poll until the status is succeeded.
import time
import requests
API_KEY = "YOUR_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# Step 1: Submit
payload = {
"model": "veo-3.1-lite",
"prompt": (
"A sleek white smartwatch on a minimalist marble surface, "
"camera slowly orbiting the product, soft studio lighting, "
"clean product photography style"
),
"duration": 5, # seconds
"resolution": "720p", # "720p" | "1080p"
}
resp = requests.post(
"https://genrelay.ai/v1/videos/generations",
headers=HEADERS,
json=payload
)
resp.raise_for_status()
job_id = resp.json()["id"]
print(f"Job submitted: {job_id}")
# Step 2: Poll until complete
while True:
status_resp = requests.get(
f"https://genrelay.ai/v1/videos/generations/{job_id}",
headers=HEADERS
)
data = status_resp.json()
if data["status"] == "succeeded":
print(f"Video URL: {data['output']['url']}")
break
elif data["status"] == "failed":
raise RuntimeError(f"Generation failed: {data.get('error')}")
time.sleep(10)
A 5-second clip at 720p costs $0.060 × 5 = $0.30. At 1080p: $0.120 × 5 = $0.60 per clip. Veo 3.1 also generates synchronized ambient audio natively from the prompt — useful for lifestyle clips where background sound adds realism.
How do I animate a product image into a video?
If you already have product photography, image-to-video preserves the exact product appearance while adding motion — turntable rotation, subtle float, zoom-out reveal. Grok Imagine 1.5 handles i2v at $0.022 per second.
import time
import base64
import requests
from pathlib import Path
API_KEY = "YOUR_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# Encode product image
image_b64 = base64.b64encode(Path("product_shoe.jpg").read_bytes()).decode()
payload = {
"model": "grok-imagine-1.5",
"image": f"data:image/jpeg;base64,{image_b64}",
"prompt": (
"The shoe slowly rotates clockwise, revealing all angles, "
"clean white background, studio lighting"
),
"duration": 5,
}
resp = requests.post(
"https://genrelay.ai/v1/videos/generations",
headers=HEADERS,
json=payload
)
resp.raise_for_status()
job_id = resp.json()["id"]
while True:
status = requests.get(
f"https://genrelay.ai/v1/videos/generations/{job_id}",
headers=HEADERS
).json()
if status["status"] == "succeeded":
print(status["output"]["url"])
break
elif status["status"] == "failed":
raise RuntimeError(status.get("error"))
time.sleep(15)
A 5-second i2v clip with Grok 1.5: $0.022 × 5 = $0.11 per clip. For product catalog animation, this is often the most cost-efficient i2v option. For higher-fidelity motion on premium products, Veo 3.1 i2v is available — see How to build an image-to-video pipeline for the Veo 3.1 i2v implementation.
How do I batch-process an entire product catalog?
For hundreds of clips, run jobs concurrently with a thread pool. Cap concurrency to avoid 429 rate-limit errors — 10 concurrent workers is safe for most plan tiers.
import time
import requests
import concurrent.futures
API_KEY = "YOUR_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
def generate_clip(product: dict) -> dict:
payload = {
"model": "grok-imagine-1.0", # lowest per-second cost
"prompt": (
f"Product showcase of {product['name']}, "
"studio lighting, white background, slow camera orbit"
),
"duration": 5,
"resolution": "720p",
}
resp = requests.post(
"https://genrelay.ai/v1/videos/generations",
headers=HEADERS,
json=payload
)
resp.raise_for_status()
job_id = resp.json()["id"]
for _ in range(60): # 10-min timeout
time.sleep(10)
status = requests.get(
f"https://genrelay.ai/v1/videos/generations/{job_id}",
headers=HEADERS
).json()
if status["status"] == "succeeded":
return {**product, "video_url": status["output"]["url"]}
if status["status"] == "failed":
return {**product, "video_url": None, "error": status.get("error")}
return {**product, "video_url": None, "error": "timeout"}
catalog = [
{"id": "SKU001", "name": "minimalist leather wallet, dark brown"},
{"id": "SKU002", "name": "ceramic pour-over coffee dripper, matte black"},
# ... rest of catalog
]
with concurrent.futures.ThreadPoolExecutor(max_workers=10) as pool:
results = list(pool.map(generate_clip, catalog))
for r in results:
status = r["video_url"] or f"FAILED — {r.get('error')}"
print(f"{r['id']}: {status}")
For per-user cost tracking, queue management in SaaS context, and COGS calculations at scale, see AI video generation API for SaaS products.
How much does a product catalog cost at scale?
Assumptions: 5-second clips, 720p resolution, text-to-video generation.
| Catalog size | Grok 1.0 ($0.010/s) | Omni Flash ($0.10/clip) | Veo 3.1 Lite ($0.060/s) |
|---|---|---|---|
| 100 clips | $5.00 | $10.00 | $30.00 |
| 500 clips | $25.00 | $50.00 | $150.00 |
| 2,000 clips | $100.00 | $200.00 | $600.00 |
Grok 1.0 is the clear winner for volume — 6× cheaper than Veo 3.1 Lite for the same clip spec. Omni Flash sits in between and eliminates per-second math: you pay a flat $0.10 per 720p clip regardless of clip duration, which simplifies budget forecasting for fixed-length catalog clips.
When Veo 3.1 Lite is worth the premium: hero banners, above-the-fold landing page clips, or any placement where video quality directly influences conversion. For catalog thumbnails and secondary product pages, Grok 1.0 or Omni Flash is typically sufficient.
For image-to-video at scale — animating existing product photos — Grok 1.5 at $0.022/s ($0.11 per 5s clip) is a cost-effective middle ground between raw t2v and Veo-quality i2v.
What resolution should I target for each e-commerce surface?
| Platform / placement | Resolution | Aspect ratio |
|---|---|---|
| TikTok, Instagram Reels, YouTube Shorts | 720p | 9:16 portrait |
| Instagram feed video | 720p | 1:1 or 4:5 |
| YouTube standard | 1080p | 16:9 landscape |
| E-commerce product page hero | 1080p | 16:9 or 1:1 |
| Product listing thumbnail | 720p | 1:1 or 16:9 |
| Email campaign GIF/video | 720p | 16:9 |
720p is adequate for mobile-first surfaces and thumbnail previews. Upgrade to 1080p selectively — only for fullscreen hero placements where the 2× cost increase (Veo 3.1: $0.060/s → $0.120/s) justifies the quality gain.
FAQ
Can I use my existing product photos as the starting frame?
Yes. Grok Imagine 1.5 and Veo 3.1 i2v both accept a product image as input and animate from it. This preserves exact product color, texture, and shape better than text-only prompts, making it the recommended approach for catalog work where brand consistency matters.
What is the minimum clip duration?
As of September 2026, Veo 3.1 Lite and Grok 1.0/1.5 support durations as short as 2 seconds. Omni Flash generates at a fixed duration per model configuration. See the Veo model page for current minimum values.
How long does generation take per clip?
Expect 20–90 seconds for a 5-second clip depending on model and server load. Use async concurrency for batch workloads — the batch example above runs up to 10 jobs simultaneously, so 500 clips finishes in roughly 500 ÷ 10 × 60s ≈ 50 minutes, not 500 × 60s sequentially.
Do videos come with audio?
Veo 3.1 natively generates synchronized ambient sound, dialogue, and music from the text prompt when audio generation is enabled. Grok 1.0/1.5 and Omni Flash produce silent video — overlay your own music or voiceover in post-processing.
What format are videos returned in?
Videos are returned as MP4 URLs in the output.url field. URLs expire after 24 hours — download and store to your own S3 or GCS bucket immediately for permanent retention.
As of September 2026, GenRelay provides access to Veo 3.1 (t2v / i2v / ref2v), Grok 1.0, Grok 1.5, and Omni Flash through a single unified endpoint. Browse the full model catalog at the Veo model page.