Create 3D Spinning Videos with PiAPI API and n8n

This n8n workflow automates the creation of detailed 3D spinning videos from text prompts using the PiAPI API, saving hours in manual 3D model design and animation. It fetches and polishes high-quality images and videos with AI-powered tools seamlessly.
httpRequest
if
code
+3
Workflow Identifier: 1937
NODES in Use: Manual Trigger, HTTP Request, If, Code, Wait, Sticky Note

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What this workflow does

This workflow helps you create 3D spinning videos of characters from simple text descriptions. It stops lots of slow, manual work by making images and videos automatically. You get a neat 3D style image, a clear figurine front-view, and a rotation video without using hard 3D software or animation skills.

The process includes sending text to Midjourney to make images, waiting for them, refining one image with GPT-4o Image Generator, then making a rotating video with Kling model. All steps check status and wait for tasks to finish. You save many hours and avoid mistakes.


Tools and services used

  • n8n: Workflow automation tool to connect APIs.
  • PiAPI Midjourney model: Creates chibi-style 3D character images from text.
  • GPT-4o Image Generator: Refines the selected image into detailed 3D figurine front-view.
  • PiAPI Kling model: Produces a vertical spinning video from the refined image.

Inputs, processing steps, and output

Inputs

  • Character description text prompt with style details.
  • API keys for PiAPI Midjourney and Kling, and for GPT-4o Image Generator.

Processing Steps

  1. Trigger the process manually inside n8n.
  2. Send prompt to PiAPI Midjourney for initial 3D image generation.
  3. Check and wait for image generation to complete.
  4. Pick one random image URL from results.
  5. Send that image URL to GPT-4o Image Generator to get a better 3D figurine front image.
  6. Parse the streaming GPT response to get the refined image URL.
  7. Repeat refinement request if image URL not found.
  8. Send refined image URL to PiAPI Kling model to make a rotating video.
  9. Check video generation status and wait until done.
  10. Extract clean video URL without watermark.

Output

A ready-to-share 9:16 vertical video URL showing the refined 3D character spinning with details.


Beginner step-by-step: How to use this workflow in n8n

Step 1: Download and import the workflow

  1. Download the workflow file using the Download button on this page.
  2. Open n8n editor and click “Import from File” to load the workflow.

Step 2: Add your API keys

  1. Go to the imported workflow nodes needing credentials.
  2. Enter PiAPI API keys in nodes calling Midjourney and Kling model, using the x-api-key header.
  3. Set GPT-4o Image Generator node with HTTP Header Auth using Bearer token and your GPT API key.

Step 3: Update IDs or text if needed

  1. If your use case needs different prompts, edit the JSON “prompt” field in the Prompt node.
  2. Update any channels, emails, or IDs in notification nodes if added.

Step 4: Test the workflow

  1. Use the Manual Trigger node and click “Execute Workflow” to test.
  2. Watch each node output to confirm images and video URLs generate correctly.

Step 5: Activate for production

  1. After testing, activate the workflow inside n8n to run live.
  2. Trigger the workflow manually or via HTTP triggers as preferred.
  3. If self-hosting n8n, consider using self-host n8n for better control.

Customization ideas

  • Change the character prompt text in the Prompt node JSON to make different images.
  • Adjust the aspect_ratio in image and video nodes to fit different viewing formats.
  • Tweak retry limits and wait times in the If nodes for generation checks to match your API performance.
  • Replace simple header auth in GPT-4o node with OAuth if more security is needed.
  • Add notification nodes (email or chat apps) to get alerts when the final video is ready.

Common problems and solutions

  • API key unauthorized errors: Check all HTTP Request nodes have exact correct API keys in the headers. Update any outdated keys.
  • Image generation stuck pending: Confirm the If node checking data.status is set to detect “completed” exactly.
  • No image URL from GPT-4o response: Use the given code snippet exactly for parsing streamed chunks. Add console logs to debug if needed.
  • Video generation never finishes: Make sure If node for video status compares string “completed” exactly and wait time between retries is long enough (20 seconds).

Pre-production checklist

  • Ensure all API keys are valid and entered correctly in each node.
  • Run the workflow step by step in test mode, check outputs at each node.
  • Test edge cases with unusual prompts or network disturbances.
  • Save a backup of your workflow file before changes to allow rollback.
  • Verify all wait and condition nodes fit the actual API response structure.

Summary

✓ Saves many hours by automating 3D model and video creation.
✓ Avoids manual errors and tedious waiting.
✓ Outputs clean 3D spinning videos ready to share.
→ Uses text prompts plus API keys to run fully automatic workflows in n8n.
→ Works well for creatives who want simple, fast 3D presentations without deep technical skills.


Frequently Asked Questions

The workflow needs PiAPI API keys for Midjourney and Kling models plus a GPT-4o Image Generator API key set as a Bearer token.
The workflow uses If nodes to check the status field in API responses for the exact value “completed” and waits before retrying.
Yes, edit the JSON prompt text inside the Prompt HTTP Request node to describe any character needed.
Yes, the workflow works on self-hosted n8n. Refer to the linked resource for details on installing and running n8n on your server.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation Workflows in n8n

A complete beginner guide to building an AI SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free