Image to Video Generation using Stable Video Diffusion and Replicate - n8n Workflow

Automate image-to-video conversion using the Stability AI Stable Video Diffusion model via Replicate. This reusable n8n workflow template includes robust polling and error handling.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Content creators and marketing professionals needing scalable video asset generation.

  • Developers integrating cutting-edge AI media tools into their applications.

  • Users searching for practical n8n templates demonstrating advanced API interaction and polling logic.

  • n8n specialists requiring a reliable imageaudiogeneration solution.

Overview

Generating media via external AI APIs often involves asynchronous processes, requiring constant status checking—a technique known as polling. This advanced n8n workflow eliminates the need for manual monitoring by providing a complete, self-contained solution for interacting with the Stable Video Diffusion model through the Replicate API.

The core value of this n8n workflow is its robustness. It handles the initial request, sets custom generation parameters (like motion bucket ID and frames per second), waits intelligently using the Wait n8n node, and loops back to check the status until the video generation either succeeds or fails. This is a crucial example of an efficient aiautomationworkflows architecture that guarantees reliable results, making it one of the most useful n8n templates for generative AI.

How it Works

The process begins with the Manual Trigger n8n trigger. Once activated, the workflow follows these steps:


  1. Authentication & Configuration: The Set API Token n8n node securely injects the necessary Replicate API key. The subsequent Set Video Parameters n8n node defines all required inputs, including the input image URL and key SVD settings like condaug and framesper_second.

  2. Initiate Generation: The Create Video Prediction n8n node uses an HTTP POST request to tell Replicate to start the generation job for the stability-ai/stable-video-diffusion model. This step returns a prediction ID.

  3. Polling Loop: The workflow enters a monitoring phase. After an initial Wait 5s n8n node, the Check Status n8n node repeatedly queries the Replicate API using the prediction ID.

  4. Conditional Routing: The Is Complete? n8n node uses conditional logic to check if the status equals 'succeeded'. If true, the output is routed to Success Response. If false, the process moves to the Has Failed? n8n node.

  5. Retry Mechanism: If the video is still processing (neither succeeded nor failed), the workflow hits the Wait 10s n8n node, and the connection sends the flow back to the Check Status n8n node, effectively creating a resilient polling loop. If the process has failed, it is routed to the Error Response n8n node.

  6. Final Output: Both success and error paths converge at the Display Result n8n node, which formats the final structured JSON response containing the video URL or detailed error information.

Installation Guide

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


  1. Import the n8n template: Copy the provided JSON code and import it directly into your n8n instance via the 'New' menu > 'Import from JSON'.

  2. Set Replicate Credentials: Locate the Set API Token n8n node. Replace the placeholder value YOURREPLICATEAPITOKEN with your actual token obtained from Replicate.com.

  3. Configure Parameters: Navigate to the Set Video Parameters n8n node. Here, you must provide a valid inputimage URL. Optionally, adjust parameters like seed, motionbucketid, or framespersecond to fine-tune the video generation.

  4. Execution: Click the Manual Trigger n8n trigger node and select 'Test Workflow' or 'Run Workflow' to initiate the video generation process.

This robust n8n workflow is now ready to automate your image-to-video tasks.

Node Details

Manual Trigger (n8n trigger): The starting point for the execution. It allows for quick, manual testing of this n8n workflow.
Set API Token (Set n8n node): Essential for security, this node stores the Replicate API authorization header value (Bearer YOURREPLICATEAPITOKEN) for use in subsequent HTTP Request nodes.
Set Video Parameters (Set n8n node): Configures all input parameters required by the Stability AI SVD model, including the mandatory inputimage URL. This is where you customize the output of the aiautomationworkflows.
Create Video Prediction (HTTP Request n8n node): Sends the initial asynchronous request to the Replicate API endpoint. Crucially, it captures the generated prediction ID needed for status checks.
Check Status (HTTP Request n8n node): Part of the polling loop, this n8n node repeatedly checks the status of the video generation job using the prediction ID and the stored API token.
Is Complete? (IF n8n node): A core logic n8n node that checks if the status field returned by Replicate is succeeded. This directs the n8n workflow toward either success handling or continued polling.


  • Wait 5s/Wait 10s (Wait n8n node): These nodes manage the polling frequency, ensuring the n8n workflow doesn't overwhelm the API with requests while waiting for the resource to be generated. This optimizes cost and efficiency.

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*