π¬ Generate videos from images with Wan 2.2 I2V A14B AI model
β‘ 3,733 views Β· π¬ Content Creation & Video
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
HTTP Request
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File