Skip to content

Product Video Pipeline

Fresh

Overview

The product video pipeline converts a product image into a professional video ad through AI-generated scenes. The flow supports image regeneration and video regeneration for iterative refinement.

Full Pipeline Diagram

Detailed Sequence

Code Example

python
import time
import requests

headers = {
    "X-API-ID": API_ID,
    "X-API-KEY": API_KEY,
    "Content-Type": "application/json"
}

BASE = "https://api.creatify.ai/api/product_videos"

# Phase 1: Generate AI image
task = requests.post(f"{BASE}/gen_image/", headers=headers, json={
    "image_url": "https://example.com/product.jpg",
    "prompt": "Professional studio product photo with soft lighting"
}).json()
task_id = task["id"]

# Poll image generation
result = poll_until_done(f"{BASE}/{task_id}/", headers)
print(f"Generated image: {result['generated_image']}")

# Optional: Regenerate image if not satisfactory
# requests.post(f"{BASE}/{task_id}/regen_image/", headers=headers,
#     json={"prompt": "Different style prompt"})

# Phase 2: Generate video
requests.post(f"{BASE}/{task_id}/gen_video/", headers=headers)

# Poll video generation
final = poll_until_done(f"{BASE}/{task_id}/", headers)
print(f"Final video: {final['output']}")

Prompt Tips for Better Results

Prompt TypeExampleResult
Studio setting"Product on white background with studio lighting"Clean, professional
Lifestyle"Product in use in a modern kitchen"Contextual, relatable
Luxury"Product on marble surface with golden accents"Premium feel
Minimalist"Product floating with simple gradient background"Modern, clean
Outdoor"Product on wooden table in a garden setting"Natural, organic

Error Handling

PhaseErrorRecovery
gen_imageImage URL not accessibleUse publicly accessible URL
gen_imagePoor quality outputRegen with a more specific prompt
gen_videoFailed statusCheck failed_reason, regen video
regen_videoStill not satisfactoryRegen image first with new prompt, then regen video

Credit Cost

OperationCredits
Generate imageIncluded
Regenerate imageIncluded
Generate video3 per 30s
Regenerate video3 per 30s

See Also