{
  "meta": {
    "model_name": "wan-2.2-t2v-fast",
    "model_type": "video",
    "version_id": "17eacc978d91e78a88d808d66d3bc7cbc7f8a2248ace0c48cab8105ad1a68509",
    "model_owner": "wan-video",
    "generated_at": "2025-08-01T14:50:46.569212"
  },
  "name": "wan-video/wan-2.2-t2v-fast - Video Generator",
  "nodes": [
    {
      "id": "e5387e13-d9c5-4bd1-b050-96671c4e8f1d",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -896,
        -176
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "740ad8a9-694f-4c8e-a319-33a46c5bbe18",
      "name": "Set API Token",
      "type": "n8n-nodes-base.set",
      "position": [
        -608,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "YOUR_REPLICATE_API_TOKEN"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "55231f68-fff7-463a-9dbe-9fe8dcc093b4",
      "name": "Set Video Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        -128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "api_token",
              "name": "api_token",
              "type": "string",
              "value": "={{ $('Set API Token').item.json.api_token }}"
            },
            {
              "id": "seed",
              "name": "seed",
              "type": "number",
              "value": -1
            },
            {
              "id": "prompt",
              "name": "prompt",
              "type": "string",
              "value": "A person walking through a magical forest with glowing particles"
            },
            {
              "id": "go_fast",
              "name": "go_fast",
              "type": "boolean",
              "value": true
            },
            {
              "id": "num_frames",
              "name": "num_frames",
              "type": "number",
              "value": 81
            },
            {
              "id": "resolution",
              "name": "resolution",
              "type": "string",
              "value": "480p"
            },
            {
              "id": "aspect_ratio",
              "name": "aspect_ratio",
              "type": "string",
              "value": "16:9"
            },
            {
              "id": "sample_shift",
              "name": "sample_shift",
              "type": "number",
              "value": 12
            },
            {
              "id": "frames_per_second",
              "name": "frames_per_second",
              "type": "number",
              "value": 16
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "a9bf88cc-03c6-4889-98eb-9eeda9a70d62",
      "name": "Create Video Prediction",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -64,
        -128
      ],
      "parameters": {
        "url": "https://api.replicate.com/v1/predictions",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "jsonBody": "={\n  \"version\": \"wan-video/wan-2.2-t2v-fast:17eacc978d91e78a88d808d66d3bc7cbc7f8a2248ace0c48cab8105ad1a68509\",\n  \"input\": {\n    \"seed\": {{ $json.seed }},\n    \"prompt\": \"{{ $json.prompt }}\",\n    \"go_fast\": {{ $json.go_fast }},\n    \"num_frames\": {{ $json.num_frames }},\n    \"resolution\": \"{{ $json.resolution }}\",\n    \"aspect_ratio\": \"{{ $json.aspect_ratio }}\",\n    \"sample_shift\": {{ $json.sample_shift }},\n    \"frames_per_second\": {{ $json.frames_per_second }}\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $json.api_token }}"
            },
            {
              "name": "Prefer",
              "value": "wait"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "0eb18982-e683-4e29-ad78-28e1f898ff4a",
      "name": "Wait 5s",
      "type": "n8n-nodes-base.wait",
      "position": [
        160,
        -128
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 5
      },
      "typeVersion": 1
    },
    {
      "id": "04ec4bc0-3a12-4f71-89ce-93ae51b71c28",
      "name": "Check Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        384,
        -128
      ],
      "parameters": {
        "url": "=https://api.replicate.com/v1/predictions/{{ $('Create Video Prediction').item.json.id }}",
        "options": {
          "response": {
            "response": {
              "neverError": true,
              "responseFormat": "json"
            }
          }
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "=Bearer {{ $('Set API Token').item.json.api_token }}"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "de675a2a-8987-4466-82c5-19406440071c",
      "name": "Is Complete?",
      "type": "n8n-nodes-base.if",
      "position": [
        528,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c93d7ba1-0ef9-4087-aa10-389cb2a2c6bd",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "succeeded"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "5f5f5ff5-ab7a-4eb2-996a-138fb870069d",
      "name": "Has Failed?",
      "type": "n8n-nodes-base.if",
      "position": [
        848,
        -80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d1bfd044-3a07-4c18-b55f-72d192596139",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "failed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "5b182dbe-d1df-4c67-87e9-c3a4881d9952",
      "name": "Wait 10s",
      "type": "n8n-nodes-base.wait",
      "position": [
        720,
        128
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 10
      },
      "typeVersion": 1
    },
    {
      "id": "4aacc07f-ab95-43a5-8403-c499093acf9c",
      "name": "Success Response",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        -320
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "success-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: true, video_url: $json.output, prediction_id: $json.id, status: $json.status, message: 'Video generated successfully' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "7601e4ae-ea85-456d-940b-50fefea59531",
      "name": "Error Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "error-response",
              "name": "response",
              "type": "object",
              "value": "={{ { success: false, error: $json.error || 'Video generation failed', prediction_id: $json.id, status: $json.status, message: 'Failed to generate video' } }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "2b42d638-98bf-4c2b-9093-d80e4fae80dc",
      "name": "Display Result",
      "type": "n8n-nodes-base.set",
      "position": [
        1552,
        -144
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "final-result",
              "name": "final_result",
              "type": "object",
              "value": "={{ $json.response }}"
            }
          ]
        }
      },
      "typeVersion": 3.3
    },
    {
      "id": "2d61ac0d-754a-47d2-9502-7cd2a7170c62",
      "name": "Log Request",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        -320
      ],
      "parameters": {
        "jsCode": "// Log generation details for monitoring\nconst data = $input.all()[0].json;\n\nconsole.log('wan-video/wan-2.2-t2v-fast Request:', {\n  timestamp: new Date().toISOString(),\n  prediction_id: data.id,\n  model_type: 'video'\n});\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "a9b9530c-24f3-4d98-a9aa-298b1a854753",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        -304
      ],
      "parameters": {
        "color": 4,
        "width": 580,
        "height": 320,
        "content": "=======================================\n        WAN-2.2-T2V-FAST GENERATOR\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n======================================="
      },
      "typeVersion": 1
    },
    {
      "id": "7389b08d-8305-47aa-b03b-10e67a6e87ae",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1536,
        48
      ],
      "parameters": {
        "color": 4,
        "width": 589,
        "height": 1958,
        "content": "## \ud83e\udd16 **WAN-VIDEO/WAN-2.2-T2V-FAST - VIDEO GENERATION WORKFLOW**\n\n**\ud83d\udd25 Powered by Replicate API and n8n Automation**\n\n---\n\n### \ud83d\udcdd **Model Overview**\n\n- **Owner**: wan-video\n- **Model**: wan-2.2-t2v-fast\n- **Type**: Video Generation\n- **API Endpoint**: https://api.replicate.com/v1/predictions\n\n**\ud83c\udfaf What This Model Does:**\nA very fast and cheap PrunaAI optimized version of Wan 2.2 A14B text-to-video\n\n---\n\n### \ud83d\udccb **Parameter Reference**\n\n**\ud83d\udd34 Required Parameters:** prompt\n**\ud83d\udd35 Optional Parameters:** seed, go_fast, num_frames, resolution, aspect_ratio, sample_shift, frames_per_second\n\n**\ud83d\udcd6 Detailed Parameter Guide:**\n- **seed** (integer): Random seed. Leave blank for random\n- **prompt** (string): Prompt for video generation\n- **go_fast** (boolean): Go fast (Default: True)\n- **num_frames** (integer): Number of video frames. 81 frames give the best results (Default: 81)\n- **resolution** (string): Resolution of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px (Default: 480p)\n- **aspect_ratio** (string): Aspect ratio of video. 16:9 corresponds to 832x480px, and 9:16 is 480x832px (Default: 16:9)\n- **sample_shift** (number): Sample shift factor (Default: 12)\n- **frames_per_second** (integer): Frames per second. Note that the pricing of this model is based on the video duration at 16 fps (Default: 16)\n\n---\n\n### \ud83d\udd27 **Workflow Components Explained**\n\n**\ud83c\udfaf Manual Trigger**\n- Starts the workflow execution\n- Click to begin video generation process\n\n**\ud83d\udd10 Set API Token** \n- Configures your Replicate API authentication\n- Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n- Essential for accessing the wan-video/wan-2.2-t2v-fast model\n\n**\u2699\ufe0f Set Video Parameters**\n- Configures all input parameters for the model\n- Includes both required and optional parameters\n- Pre-filled with sensible defaults for testing\n\n**\ud83d\ude80 Create Video Prediction**\n- Sends the generation request to Replicate API\n- Uses the video parameters you configured\n- Returns a prediction ID for status tracking\n\n**\u23f3 Wait & Status Checking Loop**\n- Waits 5 seconds then checks prediction status\n- Continues checking until completion or failure\n- Implements intelligent retry logic with 10-second delays\n\n**\u2705 Success/Error Handling**\n- Routes successful completions to success response\n- Handles failures gracefully with error details\n- Returns structured JSON response with URLs/errors\n\n**\ud83d\udcca Logging & Monitoring**\n- Logs all requests for debugging and monitoring\n- Tracks timestamps and prediction IDs\n- Helps identify issues during development\n\n---\n\n### \ud83c\udf1f **Key Benefits**\n\n- **\ud83c\udfa8 Instant Video Generation**: Transform ideas into videos using state-of-the-art AI\n- **\ud83d\udd04 Automated Workflow**: Handles the complete generation pipeline automatically\n- **\ud83d\udee1\ufe0f Error Resilience**: Built-in retry logic and comprehensive error handling\n- **\ud83d\udcc8 Production Ready**: Includes logging, monitoring, and structured responses\n- **\ud83d\udd27 Customizable**: Easy to modify parameters and extend functionality\n- **\u26a1 Efficient Processing**: Optimized API calls with intelligent status checking\n\n---\n\n### \ud83d\ude80 **Quick Start Instructions**\n\n1. **\ud83d\udd11 Get Your API Key**\n   - Sign up at https://replicate.com\n   - Navigate to your account settings\n   - Copy your API token\n\n2. **\ud83d\udd27 Configure the Workflow**\n   - Replace 'YOUR_REPLICATE_API_TOKEN' with your actual token\n   - Adjust parameters in the 'Set Video Parameters' node\n   - Customize the prompt or other inputs as needed\n\n3. **\u25b6\ufe0f Execute the Workflow**\n   - Click the 'Manual Trigger' to start\n   - Monitor the execution in the n8n interface\n   - Check logs for detailed execution information\n\n4. **\ud83d\udce5 Get Your Results**\n   - Successful generations return a URL to your video\n   - Download or use the generated content as needed\n   - Results are available immediately upon completion\n\n---\n\n### \ud83d\udd0d **Troubleshooting Guide**\n\n**Common Issues:**\n- **Invalid API Token**: Ensure your Replicate token is valid and has sufficient credits\n- **Parameter Validation**: Check that required parameters match expected types\n- **Generation Timeout**: Some videos take longer - monitor the logs\n- **Output Format**: Verify the model returns the expected output format\n\n**Best Practices:**\n- Test with default parameters first\n- Monitor your Replicate usage and billing\n- Keep API tokens secure and never commit them to code\n- Use appropriate parameter values for your use case\n\n---\n\n**\ud83d\udd17 Additional Resources:**\n- Model Documentation: https://replicate.com/wan-video/wan-2.2-t2v-fast\n- Replicate API Docs: https://replicate.com/docs\n- n8n Documentation: https://docs.n8n.io\n\n---"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "versionId": "1",
  "connections": {
    "Wait 5s": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10s": {
      "main": [
        [
          {
            "node": "Check Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Failed?": {
      "main": [
        [
          {
            "node": "Error Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 10s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Request": {
      "main": [
        [
          {
            "node": "Wait 5s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Status": {
      "main": [
        [
          {
            "node": "Is Complete?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Complete?": {
      "main": [
        [
          {
            "node": "Success Response",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Has Failed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set API Token": {
      "main": [
        [
          {
            "node": "Set Video Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Response": {
      "main": [
        [
          {
            "node": "Display Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Set API Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Response": {
      "main": [
        [
          {
            "node": "Display Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Video Prediction": {
      "main": [
        [
          {
            "node": "Log Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}