AI 3D Structured Image Generator using Part Crafter via Replicate - n8n Workflow

Automate 3D structured image generation using the powerful fire/part-crafter AI model on Replicate. This robust n8n workflow includes comprehensive polling logic, retries, and error handling for production use.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Developers & Engineers: Building AI-driven APIs or microservices requiring 3D generation capabilities.
Designers & Creators: Needing an automated way to transform 2D images into structured 3D parts.
Automation Specialists: Seeking advanced examples of using the n8n node structure for asynchronous API polling (wait/check loops).
Technical Users: Looking for ready-to-use n8n templates integrating external AI services like Replicate.

Overview

Generating complex AI outputs, such as 3D models, often involves asynchronous processes. The key challenge is creating a reliable automation that initiates the job and then efficiently waits for the result without timing out. This n8n workflow solves this by providing a complete, production-ready framework for utilizing the Replicate API's fire/part-crafter model—which creates multiple structured parts from a single RGB image.

This robust n8n workflow demonstrates best practices for API integration, incorporating secure token management, comprehensive parameter configuration, logging, and an intelligent polling loop using the n8n node structure for status checking and retry logic. It ensures that whether the generation succeeds or fails, you receive a clean, structured JSON response, making this one of the most reliable n8n templates for AI operations.

How it Works

This n8n workflow is initiated by the Manual Trigger n8n node, allowing immediate execution for testing or integration via a webhook. The process flows through the following steps:


  1. Configuration: The workflow first uses a Set API Token n8n node to define the Replicate API key, followed by a Set Image Parameters n8n node where crucial inputs like the source image URL, seed, numparts (default 16), and guidancescale are defined.

  2. Request Initiation: The Create Image Prediction n8n node sends a POST request to Replicate’s /v1/predictions endpoint, using the Bearer token for authentication and submitting the configured model parameters. This returns a prediction ID.

  3. Logging and Waiting: The prediction ID is logged, and the workflow enters its polling cycle, starting with a 5-second wait (Wait 5s n8n node).

  4. Status Check: The Check Status n8n node sends a subsequent GET request using the prediction ID to retrieve the job's current status.

  5. Conditional Routing: The Is Complete? n8n node checks if the status is succeeded.

If successful, it moves to Success Response to format the final image URL output.
If not successful, the Has Failed? n8n node checks if the status is failed. If failed, it moves to Error Response.
* If neither, the workflow executes the Wait 10s n8n node and loops back to Check Status, ensuring continuous, robust monitoring until the AI generation task is complete. This complex logic makes the n8n workflow highly resilient.

Installation Guide

To deploy and run this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON code and import it directly into your n8n instance via the 'Workflows' section, using the 'New' -> 'Import from JSON' option.

  2. Obtain Replicate Credentials: Create an account and generate an API key from the Replicate website.

  3. Configure API Token: Navigate to the Set API Token n8n node. Replace the placeholder value YOURREPLICATEAPITOKEN with your actual Replicate API key.

  4. Customize Parameters (Optional but Recommended): In the Set Image Parameters n8n node, adjust the image URL (currently set to a placeholder) or fine-tune parameters like numparts or guidance_scale to meet your specific generation needs.

  5. Execute: Click the Manual Trigger n8n trigger node to run the complete n8n workflow and monitor the results.

Node Details

Manual Trigger (n8n trigger): Initiates the entire n8n workflow. Ideal for testing or when integrated into a parent workflow.
Set API Token (Set n8n node): Securely defines and passes the Replicate API Bearer Token to subsequent HTTP requests.
Set Image Parameters (Set n8n node): Configures all required inputs for the fire/part-crafter model, including the source image URL and parameters like numparts (16) and numinference_steps (50).
Create Image Prediction (HTTP Request n8n node): Sends the initial asynchronous POST request to https://api.replicate.com/v1/predictions to start the image generation process, receiving a prediction ID.
Log Request (Code n8n node): A utility n8n node used for logging the prediction ID and timestamp for monitoring and debugging purposes.
Wait 5s / Wait 10s (Wait n8n node): Essential n8n nodes for controlling the polling rate, preventing unnecessary API load and ensuring sufficient time for generation.
Check Status (HTTP Request n8n node): Polls the Replicate API using a GET request and the prediction ID to fetch the current status of the AI job.
Is Complete? / Has Failed? (If n8n node): These core logic n8n nodes manage the flow, checking the status variable (succeeded or failed) and routing the workflow to the appropriate success or error branches. If the job is still running, they route back into the waiting loop.


  • Success Response / Error Response (Set n8n node): Structure the final output, providing a clean JSON response containing either the resulting image URL or detailed error messages, making this n8n workflow easy to integrate downstream.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Building AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host If you need any help with Automations, feel free to reach out via linkedin: https://www.linkedin.com/in/yaronbeen/ And check out my Youtube channel: https://www.youtube.com/@YaronBeen/videos

Featured*