n8n

How to Generate PiAPI 3D Product Videos?

Create fast 360 or 180 spin videos from image prompts so your team can show products and 3D models with motion. This is ideal for ecommerce, ads, and creative teams that want visual assets without manual editing.

The flow starts with a manual run, then sends a prompt to PiAPI to generate images with a midjourney model and also sends another call to create images with a gpt 4o image model. It checks status, waits for results, and uses code steps to pull the final image URLs. The image URL feeds into a PiAPI video task using a kling model, which renders a short vertical video. The workflow polls video status, waits when needed, and returns the final video link when ready. This chain turns a single idea into a ready to share clip.

You need PiAPI API keys for the x api key and an Authorization header. Add your prompt, set the aspect ratio, and test with the manual trigger. Teams can replace hours of design work and speed content delivery. Great for quick product spins, character reveals, or promo teasers for social and ads.

What are the key features?

  • Manual start to test prompts and control runs on demand
  • HTTP requests to PiAPI to create image tasks with midjourney
  • Separate HTTP call to PiAPI to generate images with a gpt 4o image model
  • If nodes and Wait nodes to poll and pause until generation is done
  • Code steps extract the final image_url from each image task
  • Video generation request to PiAPI using a kling model with aspect ratio control
  • Status checks and waits for video render completion
  • Final code step returns a clean shareable video URL

What are the benefits?

  • Reduce content creation time from days to under 30 minutes
  • Automate about 80 percent of the image to video workflow
  • Handle 5 to 10 times more creative requests with the same team
  • Connect prompt to image and image to video in one pipeline
  • Lower editing errors by removing manual file handoffs

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. In your PiAPI account, open the API page and create an API key. Keep the key secure.
  4. In n8n, open the GPT 4o Image Generator node. In the Credential to connect with dropdown, click Create new credential, choose HTTP Header Auth, and add an Authorization header with value Bearer followed by your PiAPI key. Save the credential.
  5. Open the Prompt, Midjourney Generator, Generate Kling Video, and Get Video URL nodes. Add the x-api-key header with your PiAPI key, or create an HTTP Header Auth credential and select it if preferred.
  6. In the Prompt node, update the prompt text to match your product or model. Keep it clear and specific.
  7. In Generate Kling Video, set version and aspect_ratio to match your channel. For vertical social posts use 9:16.
  8. Check the Code nodes that extract image_url. Confirm the field names match the PiAPI response in your account. Adjust the JSON path if the API response format differs.
  9. Click Test workflow to run. Watch the If nodes and Wait nodes. They should turn green as each step finishes.
  10. Open the Fetch Final Video URL node output. Copy the video link and play it to confirm quality and motion.
  11. If a task is stuck in waiting, verify your API key, ensure you did not hardcode old keys, and confirm your n8n instance can receive webhooks. Retry after fixing headers.
  12. When stable, duplicate the workflow and adjust prompts for each product line to scale output.

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.