n8n

How to Generate PiAPI Virtual Try On Product Videos?

Create ready to use fashion videos from simple image links. The flow builds a 360 view try on clip that shows a model wearing an outfit. It helps ecommerce teams, fashion brands, and creators publish product media fast without a studio.

The run starts with a manual test. A parameters node stores your API key, model image link, and clothing links for either a full dress or upper and lower pieces. An HTTP call creates a try on task in PiAPI. A wait and poll loop checks task status until the image is done. If checks and switch logic route success or retry. The next HTTP call generates a video from the produced image using a prompt like walk on the catwalk. Another wait and poll loop follows until the video is ready. A final node extracts the video link for download and sharing.

You only need a PiAPI account and an API key plus public image URLs. Expect a hosted video URL that can go straight to product pages, ads, and social posts. Teams usually replace a photo shoot and editing cycle with one run, which can cut delivery from days to under an hour. It fits catalogs, seasonal drops, and influencer content at scale.

What are the key features?

  • Manual test trigger lets you run on demand for each product
  • Preset Parameters node stores API key, model image, and clothing links
  • HTTP POST creates a virtual try on task in PiAPI
  • Wait and poll loop checks task status until the image is ready
  • If and Switch nodes route success, in progress, or failure paths
  • Second HTTP POST turns the generated image into a video using your prompt
  • Second wait and poll loop monitors video creation until complete
  • Final Set node extracts a clean video_url for easy sharing
  • Supports either dress_input or upper and lower inputs for outfits

What are the benefits?

  • Reduce content production from days to under 60 minutes
  • Automate about 80 percent of manual steps in media creation
  • Handle many products per day without adding staff
  • Turn static images into a 360 view video that boosts engagement
  • Keep output consistent across listings by using a fixed prompt
  • Connect directly to PiAPI with an API key for secure calls

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with PiAPI. See the Tools Required section above for links to create accounts with these services.
  3. Create a PiAPI account and generate an API key from the API or developer page in your PiAPI dashboard.
  4. Open the Preset Parameters node in n8n and paste your API key into the x-api-key field. Add a public URL for model_input and either dress_input or both upper_input and lower_input.
  5. Open the Kling Virtual Try On Task HTTP node and confirm the x-api-key header pulls from the Preset Parameters node.
  6. Open the Generate kling video HTTP node. Confirm the header uses the same API key and review the generate_video_prompt. Adjust the prompt text if you want a different runway or pose style.
  7. Save the workflow, click Test workflow, and watch the execution. The flow will create a try on task, wait, then poll the status until the image is ready.
  8. When the first stage completes, the flow starts video generation from the produced image and polls again until finished.
  9. Open the Get Final Video URL node output. Confirm a video_url value is present and clicks open in a browser.
  10. If you see a 401 error, recheck the API key. If tasks stay queued, verify your image URLs are reachable and try a longer wait time between polls.
  11. Optionally, tweak the prompt or switch conditions to handle custom statuses or to retry more times based on your account limits.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

PIAPI

Sign up

Free plan: $0 / mo (API access to basic APIs); Pay-as-you-go Kling video from $0.16 per 5s standard video

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.