|网创项目|AI视频|AI语音|AI文字工具收录

AI漫剧-文生图

je50762026-01-16

{

  "name": "AI漫剧-文生图",

  "nodes": [

    {

      "parameters": {

        "conditions": {

          "options": {

            "caseSensitive": true,

            "leftValue": "",

            "typeValidation": "strict",

            "version": 2

          },

          "conditions": [

            {

              "id": "999349cc-077d-465d-9c08-e762716e11fd",

              "leftValue": "={{ $json.task_id }}",

              "rightValue": 0,

              "operator": {

                "type": "string",

                "operation": "exists",

                "singleValue": true

              }

            }

          ],

          "combinator": "and"

        },

        "options": {}

      },

      "type": "n8n-nodes-base.if",

      "typeVersion": 2.2,

      "position": [

        1280,

        288

      ],

      "id": "694dba9c-145c-4906-908f-b5949c8d8e86",

      "name": "If"

    },

    {

      "parameters": {},

      "type": "n8n-nodes-base.wait",

      "typeVersion": 1.1,

      "position": [

        1552,

        288

      ],

      "id": "450a44a1-169c-407a-9629-38b6437e8988",

      "name": "Wait",

      "webhookId": "b426dffa-8bf6-4337-a892-408371e662be"

    },

    {

      "parameters": {

        "conditions": {

          "options": {

            "caseSensitive": true,

            "leftValue": "",

            "typeValidation": "strict",

            "version": 2

          },

          "conditions": [

            {

              "id": "4f4e9ba2-123c-4231-8d59-d297375cf47b",

              "leftValue": "={{ $json.task.status }}",

              "rightValue": "TASK_STATUS_SUCCEED",

              "operator": {

                "type": "string",

                "operation": "equals",

                "name": "filter.operator.equals"

              }

            }

          ],

          "combinator": "or"

        },

        "options": {}

      },

      "type": "n8n-nodes-base.if",

      "typeVersion": 2.2,

      "position": [

        1936,

        288

      ],

      "id": "af9105c1-f68b-40f5-9c42-09b86311de6a",

      "name": "If1",

      "retryOnFail": false

    },

    {

      "parameters": {

        "conditions": {

          "options": {

            "caseSensitive": true,

            "leftValue": "",

            "typeValidation": "strict",

            "version": 2

          },

          "conditions": [

            {

              "id": "95663f30-5e57-4d3d-88bd-e11abce866ae",

              "leftValue": "={{ $('查询状态').item.json.task.status }}",

              "rightValue": "TASK_STATUS_QUEUED",

              "operator": {

                "type": "string",

                "operation": "equals",

                "name": "filter.operator.equals"

              }

            },

            {

              "id": "2ce0d51f-df9e-4817-adfb-2949754773e0",

              "leftValue": "={{ $('查询状态').item.json.task.status }}",

              "rightValue": "TASK_STATUS_PROCESSING",

              "operator": {

                "type": "string",

                "operation": "equals",

                "name": "filter.operator.equals"

              }

            }

          ],

          "combinator": "or"

        },

        "options": {}

      },

      "type": "n8n-nodes-base.if",

      "typeVersion": 2.2,

      "position": [

        2160,

        288

      ],

      "id": "7da9e88b-7b93-4bb8-84e1-fd338e2d4fff",

      "name": "If2"

    },

    {

      "parameters": {

        "url": "https://api.jiekou.ai/v3/async/task-result",

        "authentication": "predefinedCredentialType",

        "nodeCredentialType": "httpBearerAuth",

        "sendQuery": true,

        "queryParameters": {

          "parameters": [

            {

              "name": "task_id",

              "value": "={{ $('发起任务').item.json.task_id }}"

            }

          ]

        },

        "options": {}

      },

      "type": "n8n-nodes-base.httpRequest",

      "typeVersion": 4.2,

      "position": [

        1744,

        288

      ],

      "id": "3ecffec0-6c7f-45c0-8821-11dbce3809eb",

      "name": "查询状态",

      "retryOnFail": true,

      "credentials": {

        "httpBearerAuth": {

          "id": "nvVFpuzvpm2UaCSN",

          "name": "test"

        }

      }

    },

    {

      "parameters": {

        "method": "POST",

        "url": "https://api.jiekou.ai/v3/async/z-image-turbo",

        "authentication": "predefinedCredentialType",

        "nodeCredentialType": "httpBearerAuth",

        "sendBody": true,

        "specifyBody": "json",

        "jsonBody": "={\n  \"size\": \"{{ $json.width }}*{{ $json.height }}\",\n  \"prompt\": \"{{ $json.prompt }}\"\n}",

        "options": {}

      },

      "type": "n8n-nodes-base.httpRequest",

      "typeVersion": 4.2,

      "position": [

        1008,

        288

      ],

      "id": "c34af8d1-b37a-410e-abf7-ed15e95d73b3",

      "name": "发起任务",

      "retryOnFail": true,

      "credentials": {

        "httpBearerAuth": {

          "id": "nvVFpuzvpm2UaCSN",

          "name": "test"

        }

      }

    },

    {

      "parameters": {

        "operation": "write",

        "fileName": "=/data/img_{{ $now.format('yyyy-MM-dd_hh-mm-ss') }}_{{ Math.floor(Math.random() * 10000) }}.{{ $json.images[0].image_type }}",

        "options": {}

      },

      "type": "n8n-nodes-base.readWriteFile",

      "typeVersion": 1,

      "position": [

        736,

        752

      ],

      "id": "bb2dce6e-730f-4a27-9967-aee22b8ce558",

      "name": "Read/Write Files from Disk"

    },

    {

      "parameters": {

        "assignments": {

          "assignments": [

            {

              "id": "565c1e1b-70c2-403d-a35f-4f43cfd2c0ae",

              "name": "prompt",

              "value": "={{ $json.prompt }}",

              "type": "string"

            },

            {

              "id": "9a6fc81d-bcce-4652-a2ee-aeef432586c3",

              "name": "output_folder_path",

              "value": "={{ $json.output_folder_path }}",

              "type": "string"

            },

            {

              "id": "335ce323-fe4c-4f68-b8d9-db1cb63f2d39",

              "name": "width",

              "value": "={{ $json.width }}",

              "type": "string"

            },

            {

              "id": "2e42c1d8-4fc3-41c9-91e1-4f5c6f4a2754",

              "name": "height",

              "value": "={{ $json.height }}",

              "type": "string"

            }

          ]

        },

        "options": {}

      },

      "type": "n8n-nodes-base.set",

      "typeVersion": 3.4,

      "position": [

        752,

        288

      ],

      "id": "8652e871-66a4-43d6-b40e-913f2ce63f41",

      "name": "配置字段"

    },

    {

      "parameters": {

        "workflowInputs": {

          "values": [

            {

              "name": "prompt"

            },

            {

              "name": "width",

              "type": "number"

            },

            {

              "name": "height",

              "type": "number"

            }

          ]

        }

      },

      "type": "n8n-nodes-base.executeWorkflowTrigger",

      "typeVersion": 1.1,

      "position": [

        496,

        288

      ],

      "id": "f8ea0bc8-bdbb-4afd-9511-3f92afb7a5f4",

      "name": "When Executed by Another Workflow"

    },

    {

      "parameters": {

        "assignments": {

          "assignments": [

            {

              "id": "de858876-b71d-4290-8aa1-5ac20bbd84a2",

              "name": "prompt",

              "value": "一个女人的半身照,白底背景,卡通风格",

              "type": "string"

            },

            {

              "id": "ba148f83-d4f6-4943-ad6f-49d1dbebcdd9",

              "name": "width",

              "value": "810",

              "type": "string"

            },

            {

              "id": "26c1389a-d430-4507-96b2-6292e7af58cf",

              "name": "height",

              "value": "1440",

              "type": "string"

            }

          ]

        },

        "options": {}

      },

      "type": "n8n-nodes-base.set",

      "typeVersion": 3.4,

      "position": [

        752,

        48

      ],

      "id": "7308ba0b-db51-4983-9225-f957ff71daf5",

      "name": "Edit Fields",

      "disabled": true

    },

    {

      "parameters": {},

      "type": "n8n-nodes-base.manualTrigger",

      "typeVersion": 1,

      "position": [

        528,

        48

      ],

      "id": "fe17e7e9-946f-40d0-989c-4585d0ec0227",

      "name": "When clicking ‘Execute workflow’",

      "disabled": true

    },

    {

      "parameters": {

        "assignments": {

          "assignments": [

            {

              "id": "b56d373b-ce89-4280-bb76-745968f4d482",

              "name": "image_filepath",

              "value": "={{ $('Read/Write Files from Disk').first().json.fileName }}",

              "type": "string"

            },

            {

              "id": "e468b950-485d-4ebc-a758-00b4c6c8008e",

              "name": "image_url",

              "value": "={{ $json.images[0].image_url }}",

              "type": "string"

            }

          ]

        },

        "options": {}

      },

      "type": "n8n-nodes-base.set",

      "typeVersion": 3.4,

      "position": [

        976,

        752

      ],

      "id": "59e6590a-0844-4c05-8026-57fb7f9b9b2c",

      "name": "执行结束返回字段"

    },

    {

      "parameters": {

        "url": "={{ $('查询状态').item.json.images[0].image_url }}",

        "options": {}

      },

      "type": "n8n-nodes-base.httpRequest",

      "typeVersion": 4.2,

      "position": [

        528,

        752

      ],

      "id": "05824b17-b5b2-435f-8541-5d92d09a36fa",

      "name": "下载图片",

      "retryOnFail": true

    }

  ],

  "pinData": {},

  "connections": {

    "If": {

      "main": [

        [

          {

            "node": "Wait",

            "type": "main",

            "index": 0

          }

        ],

        [

          {

            "node": "发起任务",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "Wait": {

      "main": [

        [

          {

            "node": "查询状态",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "If1": {

      "main": [

        [

          {

            "node": "下载图片",

            "type": "main",

            "index": 0

          }

        ],

        [

          {

            "node": "If2",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "If2": {

      "main": [

        [

          {

            "node": "Wait",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "查询状态": {

      "main": [

        [

          {

            "node": "If1",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "发起任务": {

      "main": [

        [

          {

            "node": "If",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "Read/Write Files from Disk": {

      "main": [

        [

          {

            "node": "执行结束返回字段",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "配置字段": {

      "main": [

        [

          {

            "node": "发起任务",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "When Executed by Another Workflow": {

      "main": [

        [

          {

            "node": "配置字段",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "When clicking ‘Execute workflow’": {

      "main": [

        [

          {

            "node": "Edit Fields",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "下载图片": {

      "main": [

        [

          {

            "node": "Read/Write Files from Disk",

            "type": "main",

            "index": 0

          }

        ]

      ]

    },

    "Edit Fields": {

      "main": [

        [

          {

            "node": "配置字段",

            "type": "main",

            "index": 0

          }

        ]

      ]

    }

  },

  "active": false,

  "settings": {

    "executionOrder": "v1"

  },

  "versionId": "cb772b35-839a-47f9-a2f9-c16b9298e765",

  "meta": {

    "instanceId": "7cbe32103a6ff2d8c5a91f9da918c4e038e89cf9d0ca43bf8f0b67f262cbf12c"

  },

  "id": "NY9RPErc3s2auyOw",

  "tags": [

    {

      "updatedAt": "2025-12-26T08:37:31.987Z",

      "createdAt": "2025-12-26T08:37:31.987Z",

      "id": "gZ4Yf1CKJAPGykEi",

      "name": "ai漫剧"

    }

  ]

}


文章下方广告位