Generate Videos from Images with Wan 2.2 I2V A14B AI Model
Go to WorkflowDescription
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.