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
Create 3D spinning videos with n8n and PiAPI

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

Learn how to Build this Workflow with AI:

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.


Create 3D spinning videos with n8n and PiAPI

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.