{
  "name": "Generate text-to-video and image-to-video clips with Kling 2.6 via KIE.AI",
  "nodes": [
    {
      "id": "d482017f-5ecf-4ad1-85b1-4e728c090720",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1312,
        2176
      ],
      "parameters": {
        "width": 528,
        "height": 640,
        "content": "## Muhammad Farooq Iqbal - Automation Expert & n8n Creator\n\nI am a passionate automation expert and recognized n8n Creator specializing in intelligent workflow automation. With extensive experience in"
      }
    },
    {
      "id": "7c629ad9-0f73-4680-8c7f-59add65251d0",
      "name": "Submit Video Generation Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -256,
        1872
      ]
    },
    {
      "id": "4ed40627-6579-4722-9603-2b0ca56c6a94",
      "name": "Switch Video Generation Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        368,
        1824
      ]
    },
    {
      "id": "a29e2578-9cd9-4d2f-b53f-af731511ce4b",
      "name": "Check Video Generation Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        144,
        1872
      ]
    },
    {
      "id": "2ae971a7-238c-44d2-9a71-9cec1591119a",
      "name": "Wait for Video Generation",
      "type": "n8n-nodes-base.wait",
      "position": [
        -16,
        1872
      ]
    },
    {
      "id": "6028de3e-a7e2-4113-b44b-aa97ccd5cc17",
      "name": "Extract Video URL",
      "type": "n8n-nodes-base.code",
      "position": [
        608,
        1840
      ]
    },
    {
      "id": "3ca50a60-21f1-4293-bdd7-008889ad5751",
      "name": "Download Video File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        784,
        1840
      ]
    },
    {
      "id": "6a4ca7b4-22d9-4933-a718-4f424caef0a0",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -656,
        1872
      ]
    },
    {
      "id": "feb75d00-4bb1-464e-a7ff-d29ab8ff8f1f",
      "name": "Text-to-Video Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        1664
      ],
      "parameters": {
        "width": 1728,
        "height": 512,
        "content": "**Text-to-Video Workflow**\n\nGenerates videos from text prompts using Kling 2.6. Set your parameters, submit the request, and the workflow polls for completion before downloading."
      }
    },
    {
      "id": "82c41430-32a5-420f-a5d7-57956db1b894",
      "name": "Image-to-Video Section",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        2224
      ],
      "parameters": {
        "width": 1728,
        "height": 512,
        "content": "**Image-to-Video Workflow**\n\nAnimates existing images into videos using Kling 2.6. Provide an image URL and prompt, then the workflow handles generation and download."
      }
    },
    {
      "id": "ef1bcfbb-cd2a-4bc9-9c72-de50e566917a",
      "name": "Set Prompt & Image Url",
      "type": "n8n-nodes-base.set",
      "position": [
        -432,
        2384
      ]
    },
    {
      "id": "f7cbe6e7-8fcc-4fa2-9ad2-4c5de8356fbd",
      "name": "Wait for Image-to-Video Generation",
      "type": "n8n-nodes-base.wait",
      "position": [
        16,
        2384
      ]
    },
    {
      "id": "c99b20a8-4d83-4e86-9937-0d84b8055b60",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        400,
        2336
      ]
    },
    {
      "id": "38e93477-a4b6-4c7a-8a4a-d2fbb3ae9efc",
      "name": "Check Video Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        176,
        2384
      ]
    },
    {
      "id": "1049f828-f12f-474e-b715-fda858d50150",
      "name": "Download Video1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        800,
        2352
      ]
    },
    {
      "id": "f29e65fa-87b0-4c3c-b562-22501b2133bb",
      "name": "Submit Video Generation1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -208,
        2384
      ]
    },
    {
      "id": "968aab5d-95fe-4d13-9621-a61f2f45f128",
      "name": "Video URL",
      "type": "n8n-nodes-base.code",
      "position": [
        640,
        2352
      ]
    },
    {
      "id": "dfcfe5d1-9976-4417-9d4d-77224081c44f",
      "name": "Set Text to Video Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        -448,
        1872
      ]
    },
    {
      "id": "7adca58b-95b7-4155-b3e3-1d00cf895cc3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1424,
        1664
      ],
      "parameters": {
        "width": 640,
        "height": 480,
        "content": "## How it works\n\nThis workflow generates videos using Kling 2.6 AI through the KIE.AI API. You can create videos in two ways: text-to-video (describe a scene) or image-to-video (animate an existing im"
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Submit Video Generation1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Video URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Image-to-Video Generation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Image-to-Video Generation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Image-to-Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video URL": {
      "main": [
        [
          {
            "node": "Download Video1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Video URL": {
      "main": [
        [
          {
            "node": "Download Video File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Status": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Prompt & Image Url": {
      "main": [
        [
          {
            "node": "Submit Video Generation1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Video Generation1": {
      "main": [
        [
          {
            "node": "Wait for Image-to-Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Video Generation": {
      "main": [
        [
          {
            "node": "Check Video Generation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Text to Video Parameters": {
      "main": [
        [
          {
            "node": "Submit Video Generation Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Generation Status": {
      "main": [
        [
          {
            "node": "Switch Video Generation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch Video Generation Status": {
      "main": [
        [
          {
            "node": "Submit Video Generation Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract Video URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Video Generation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Video Generation",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Video Generation Request": {
      "main": [
        [
          {
            "node": "Wait for Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Image-to-Video Generation": {
      "main": [
        [
          {
            "node": "Check Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Set Text to Video Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}