This workflow connects n8n with Replicate’s Wan-Video model to generate video content from an image + prompt.
It handles:
🔗 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.
YOUR_REPLICATE_API_KEY
💡 Beginner Benefit:
✅ No need to hardcode API keys in every request
✅ Easy to swap keys for different accounts
🔗 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 descriptionimage
→ input video/image URLseed
→ reproducibilitynum_frames
→ 81 framessample_shift
→ 5sample_steps
→ 30frames_per_second
→ 164️⃣ 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
🔗 Nodes:
5️⃣ Wait (2 sec)
⏳ Adds a short delay before checking progress.
6️⃣ Check Prediction Status (HTTP Request)
🔄 Calls Replicate API → /v1/predictions/{id}
7️⃣ Check If Complete (IF Node)
❓ Compares status → succeeded
or not
💡 Beginner Benefit:
✅ Automatic re-checking → you don’t need to refresh manually
✅ Works until result is ready
🔗 Nodes:
8️⃣ Process Result (Code)
📥 Once complete, extracts:
Final output = direct video URL you can download/share 🎥
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 |
✨ 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.