{
  "name": "Generate 360° virtual try-on videos for clothing with Kling API (unofficial)",
  "nodes": [
    {
      "id": "978b4ac4-0357-4d2b-8a02-7da04e6f3f1f",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        160,
        140
      ]
    },
    {
      "id": "54d1c23f-3a13-4ec0-9b3b-3806e5faae18",
      "name": "Kling Virtual Try-On Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        620,
        140
      ]
    },
    {
      "id": "5be9d932-c102-4a7e-b995-09c6bf17026c",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        960,
        200
      ]
    },
    {
      "id": "cdda4f40-1580-4a5a-a7f4-f1e4fbf7ceb4",
      "name": "Get Kling Video Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1180,
        440
      ]
    },
    {
      "id": "3e794d14-b55f-4936-90af-8237977d6635",
      "name": "Generate kling video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1140,
        200
      ]
    },
    {
      "id": "3ae849b2-4bd4-454f-a759-e44a9736100d",
      "name": "Preset Parameters",
      "type": "n8n-nodes-base.set",
      "position": [
        380,
        140
      ]
    },
    {
      "id": "18c606e3-82e2-4c09-a87e-6bbc71363c1c",
      "name": "Get Kling Virtual Try-On Task",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        460
      ]
    },
    {
      "id": "becf3d7b-d468-4b4a-b22f-d6d747e52664",
      "name": "Check Data Status",
      "type": "n8n-nodes-base.if",
      "position": [
        640,
        460
      ]
    },
    {
      "id": "d8ec251d-d47c-4341-909d-abdea385c1f9",
      "name": "Wait for Image Generation",
      "type": "n8n-nodes-base.wait",
      "position": [
        160,
        460
      ]
    },
    {
      "id": "88e3067f-0b1f-472a-937b-926c6d208453",
      "name": "Wait for Video Generation",
      "type": "n8n-nodes-base.wait",
      "position": [
        920,
        440
      ]
    },
    {
      "id": "36d75678-918f-42c5-97a7-7a13d1eacbd4",
      "name": "Check Video Data Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        1560,
        180
      ]
    },
    {
      "id": "7356d963-83c0-47a1-a728-9191f66d2f57",
      "name": "Get Video Data Status",
      "type": "n8n-nodes-base.if",
      "position": [
        1400,
        440
      ]
    },
    {
      "id": "9ef52637-ccc9-4817-8c14-5c54fa0af178",
      "name": "Get Final Video URL",
      "type": "n8n-nodes-base.set",
      "position": [
        1760,
        180
      ]
    },
    {
      "id": "9a0194bd-59a5-45b1-a6e2-db0605eb4d7a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        140,
        -120
      ],
      "parameters": {
        "width": 460,
        "height": 220,
        "content": "## Generate 360° Virtual Try-on Videos for Clothing with Kling API (unofficial)\nThis tool is designed for e-commerce platforms, fashion brands, content creators, and content influencers. By uploading "
      }
    },
    {
      "id": "629697ae-cd49-4e8e-953d-a2f091ed9202",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        120,
        700
      ],
      "parameters": {
        "width": 340,
        "height": 200,
        "content": "## Generate Virtual Try-on Image\nUpload model url, users have two solutions to upload clothing url: \n1. Upload `dress_input`\n2. Upload 'upper_input` and 'lower_input`"
      }
    },
    {
      "id": "710bd0f0-8b5a-469a-8b31-b6f738dc7f79",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1640,
        460
      ],
      "parameters": {
        "width": 340,
        "height": null,
        "content": "## Generate Final Video \nWait for generation and get the output url in the final node."
      }
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Generate kling video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Data Status": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Image Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Preset Parameters": {
      "main": [
        [
          {
            "node": "Kling Virtual Try-On Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate kling video": {
      "main": [
        [
          {
            "node": "Wait for Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Kling Video Task": {
      "main": [
        [
          {
            "node": "Get Video Data Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Video Data Status": {
      "main": [
        [
          {
            "node": "Check Video Data Status",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Video Data Status": {
      "main": [
        [
          {
            "node": "Get Final Video URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Kling Virtual Try-On Task": {
      "main": [
        [
          {
            "node": "Wait for Image Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Image Generation": {
      "main": [
        [
          {
            "node": "Get Kling Virtual Try-On Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Video Generation": {
      "main": [
        [
          {
            "node": "Get Kling Video Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Kling Virtual Try-On Task": {
      "main": [
        [
          {
            "node": "Check Data Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Preset Parameters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}