Generate Videos from Images with Wan 2.2 I2V A14B AI Model

Go to Workflow
406 views
Built by Yaron Been Yaron Been
Created on August 04, 2025

Description

Generate Videos from Images with Wan 2.2 I2V A14B AI Model

๐ŸŒ Overview

This workflow connects n8n with Replicateโ€™s Wan-Video model to generate video content from an image + prompt.
It handles:

๐Ÿ”‘ API authentication
๐Ÿ“ค Sending a generation request
โณ Polling until completion
๐Ÿ“ฅ Returning a downloadable video link

๐ŸŸข Section 1: Start & Authentication

๐Ÿ”— Nodes:
1๏ธโƒฃ On clicking 'execute' (Manual Trigger)
โ–ถ๏ธ Starts the workflow manually when you click Execute Workflow.

2๏ธโƒฃ Set API Key
๐Ÿ”‘ Stores your Replicate API Key securely inside n8n.

Value: YOUR_REPLICATE_API_KEY

๐Ÿ’ก Beginner Benefit:
โœ… No need to hardcode API keys in every request
โœ… Easy to swap keys for different accounts

๐Ÿ”ต Section 2: Send Video Generation Request

๐Ÿ”— Nodes:
3๏ธโƒฃ Create Prediction (HTTP Request)
๐Ÿ“ค Sends a request to Replicate API โ†’ /v1/predictions

Model: wan-video/wan-2.2-i2v-a14b
Input Parameters:

๐Ÿ“ prompt โ†’ your text description
๐Ÿ–ผ๏ธ image โ†’ input video/image URL
๐ŸŽฒ seed โ†’ reproducibility
๐ŸŽž๏ธ num_frames โ†’ 81 frames
โฉ sample_shift โ†’ 5
โš™๏ธ sample_steps โ†’ 30
๐ŸŽฌ frames_per_second โ†’ 16

4๏ธโƒฃ Extract Prediction ID (Code)
๐Ÿ†” Pulls out the prediction ID + status from Replicateโ€™s response.
This ID is needed for polling until the video finishes generating.

๐Ÿ’ก Beginner Benefit:
โœ… Automates the API call to generate video
โœ… Extracts ID โ†’ avoids manual copy-paste

๐ŸŸฃ Section 3: Polling & Status Check

๐Ÿ”— Nodes:
5๏ธโƒฃ Wait (2 sec)
โณ Adds a short delay before checking progress.

Prevents API spam

6๏ธโƒฃ Check Prediction Status (HTTP Request)
๐Ÿ”„ Calls Replicate API โ†’ /v1/predictions/{id}

Checks whether the video is still processing or finished

7๏ธโƒฃ Check If Complete (IF Node)
โ“ Compares status โ†’ succeeded or not

โœ… If complete โ†’ goes to Process Result
โŒ If not โ†’ loops back to Wait and tries again

๐Ÿ’ก Beginner Benefit:
โœ… Automatic re-checking โ†’ you donโ€™t need to refresh manually
โœ… Works until result is ready

๐ŸŸก Section 4: Process Final Result

๐Ÿ”— Nodes:
8๏ธโƒฃ Process Result (Code)
๐Ÿ“ฅ Once complete, extracts:

โœ… Status
๐ŸŽž๏ธ Output video URL
๐Ÿ“Š Generation metrics
โฑ๏ธ Timestamps (created\_at, completed\_at)
๐Ÿงฉ Model used

Final output = direct video URL you can download/share ๐ŸŽฅ

๐Ÿ“Š Final Overview

| Section | What Happens | Why Itโ€™s Useful |
| --------- | ------------------------------ | --------------------------------- |
| ๐ŸŸข Auth | Manual Trigger + API Key | Secure, easy start |
| ๐Ÿ”ต Send | Create Prediction + Extract ID | Kicks off video generation |
| ๐ŸŸฃ Poll | Wait + Check Status + IF | Auto-checks progress until done |
| ๐ŸŸก Result | Process Result | Gives final video link + metadata |

๐Ÿš€ Why This Workflow Rocks

๐ŸŽฅ Video from Image + Prompt โ†’ AI-powered video generation in minutes
๐Ÿ”„ Fully automated โ†’ from request to final video, no manual checks
๐Ÿ”‘ Secure โ†’ API keys handled safely
โš™๏ธ Customizable โ†’ tweak frames, FPS, prompt, seed

โœจ With this workflow, youโ€™ve got a personal AI video generator inside n8n โ€” all you need to do is provide a prompt + input image/video, and youโ€™ll get a fresh AI video link back.

Nodes Used (2)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest