8
n8n 한국어amn8n.com

Midjourney 및 GPT-4o-Image API를 사용한 3D 모델 3면도 생성

중급

이것은Design, AI분야의자동화 워크플로우로, 10개의 노드를 포함합니다.주로 If, Code, Wait, HttpRequest, ManualTrigger 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. 3D模型正交视图생성워크플로우

사전 요구사항
  • 대상 API의 인증 정보가 필요할 수 있음
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "9r4T5kELOXAV8L1F",
  "meta": {
    "instanceId": "1e003a7ea4715b6b35e9947791386a7d07edf3b5bf8d4c9b7ee4fdcbec0447d7"
  },
  "name": "3D Figurine Orthographic Views with Midjourney and GPT-4o-Image API",
  "tags": [],
  "nodes": [
    {
      "id": "30ff7c89-7fb6-4daf-b7f2-d178ee702243",
      "name": "워크플로 '테스트' 클릭 시",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        720,
        220
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "26cb9d6e-6a73-4a27-805d-8577c84101fa",
      "name": "Midjourney Generator",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        940,
        220
      ],
      "parameters": {
        "url": "https://api.piapi.ai/api/v1/task",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"model\": \"midjourney\",\n  \"task_type\": \"imagine\",\n  \"input\": {\n    \"prompt\": \"IP design, pop mart style, cartoon-style characters, a little girl with a red satche on her back, a pair of big eyes, long eyelashes, with pigtails, wearing a red beret, red shoes, chubby body, wearing a red and white striped dress, clean white background, crystal-clear material::5, 3D rendering, 3D modeling --ar 3:4 --niji 6\",\n    \"aspect_ratio\": \"3:2\",\n    \"process_mode\": \"turbo\",\n    \"skip_prompt_check\": false\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4220555c-f4f4-43ab-8d03-1ae4b959bdd1",
      "name": "Midjourney URL 가져오기",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        760,
        460
      ],
      "parameters": {
        "url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "x-api-key",
              "value": "72858adea87ad16865d5b0a24c3d9b9f58a6e7b1a8a8a8a0d6b81a9f3a9812f3"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e81311ee-4522-4fb3-929f-1c062427c859",
      "name": "URL 획득 확인",
      "type": "n8n-nodes-base.if",
      "position": [
        960,
        460
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a0f8758e-d6fd-44f8-bd79-bc3c4dceddcf",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "9519899e-c246-474e-8fd6-7dd16cf27a5b",
      "name": "생성 대기",
      "type": "n8n-nodes-base.wait",
      "position": [
        980,
        700
      ],
      "webhookId": "f3bcf634-8c4b-4bf9-a7f2-d4ee369f5349",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "693348ab-12ab-4896-9fda-a9141263ccbf",
      "name": "랜덤 이미지 URL 가져오기",
      "type": "n8n-nodes-base.code",
      "position": [
        1240,
        520
      ],
      "parameters": {
        "jsCode": "// JavaScript Code for Function Node\nreturn {\n  random_temp_url: $input.all()[0].json.data.output.temporary_image_urls[\n    Math.floor(Math.random() * $input.all()[0].json.data.output.temporary_image_urls.length)\n  ]\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "18f030a6-7333-45df-af1d-f8c5492084c6",
      "name": "GPT-4o-Image로 삼시도 이미지 생성",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1440,
        520
      ],
      "parameters": {
        "url": "https://api.piapi.ai/v1/chat/completions",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"model\": \"gpt-4o-image-preview\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        \"url\": \"{{ $json.random_temp_url }}\"\n                    }\n                },\n                {\n                    \"type\": \"text\",\n                    \"text\": \"Convert this image into a 3D figurine image, with front view, side view, and back view in one page. Generate a turnaround sheet showing the figurine’s front with full details, profile, and back views in left-to-right sequence. ar=10:3\"\n                }\n            ]\n        }\n    ],\n    \"stream\": true\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer "
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "fsJeCNd9BkJ1CIrt",
          "name": "Header Auth account 2"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4d758715-79d5-4c2e-94d2-d1cfe1bdda6d",
      "name": "URL 획득 여부 확인",
      "type": "n8n-nodes-base.if",
      "position": [
        1840,
        520
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "08a2ebe6-dc95-4b8a-ada1-1173645cc3f4",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.finish_reason }}",
              "rightValue": "not_found"
            },
            {
              "id": "ed245d42-677f-4465-a3f1-d23c6e609f5e",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "690c002c-8641-4bb9-8c55-8b5cd6f01f2c",
      "name": "최종 출력 가져오기",
      "type": "n8n-nodes-base.code",
      "position": [
        2080,
        540
      ],
      "parameters": {
        "jsCode": "// Method 2: n8n workflow compatible version\nreturn $input.all().map(item => {\n  return {\n    image_url: item.json.image_url\n  };\n});"
      },
      "typeVersion": 2
    },
    {
      "id": "db38b578-1078-4a89-b429-55ba337a21fc",
      "name": "이미지 가져오기",
      "type": "n8n-nodes-base.code",
      "position": [
        1660,
        520
      ],
      "parameters": {
        "jsCode": "const chunks = $input.first().json.data.split('\\n\\n');\n\nlet imageUrl = null;\n\n// 反向遍历 chunks (从最新数据开始检查)\nfor (let i = chunks.length - 1; i >= 0; i--) {\n    const chunk = chunks[i];\n    \n    if (!chunk.startsWith('data: ')) continue;\n    \n    try {\n        const jsonStr = chunk.substring(6); // 去掉 \"data: \" 前缀\n        if (jsonStr.trim() === '[DONE]') continue;\n        \n        const data = JSON.parse(jsonStr);\n        \n        // 检查是否包含图片标记(Markdown 图片语法)\n        if (data.choices && data.choices[0].delta.content) {\n            const content = data.choices[0].delta.content;\n            const urlMatch = content.match(/!\\[.*?\\]\\((https?:\\/\\/[^\\s]+)\\)/);\n            \n            if (urlMatch && urlMatch[1]) {\n                imageUrl = urlMatch[1];\n                break;\n            }\n        }\n    } catch (e) {\n        continue;\n    }\n}\n\nreturn {\n    image_url: imageUrl,\n    finish_reason: imageUrl ? \"success\" : \"not_found\"\n};"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0e663ca1-c9b2-4fb2-a8bb-14ed8bb63d11",
  "connections": {
    "db38b578-1078-4a89-b429-55ba337a21fc": {
      "main": [
        [
          {
            "node": "4d758715-79d5-4c2e-94d2-d1cfe1bdda6d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4220555c-f4f4-43ab-8d03-1ae4b959bdd1": {
      "main": [
        [
          {
            "node": "e81311ee-4522-4fb3-929f-1c062427c859",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9519899e-c246-474e-8fd6-7dd16cf27a5b": {
      "main": [
        [
          {
            "node": "4220555c-f4f4-43ab-8d03-1ae4b959bdd1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "693348ab-12ab-4896-9fda-a9141263ccbf": {
      "main": [
        [
          {
            "node": "18f030a6-7333-45df-af1d-f8c5492084c6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "26cb9d6e-6a73-4a27-805d-8577c84101fa": {
      "main": [
        [
          {
            "node": "4220555c-f4f4-43ab-8d03-1ae4b959bdd1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e81311ee-4522-4fb3-929f-1c062427c859": {
      "main": [
        [
          {
            "node": "693348ab-12ab-4896-9fda-a9141263ccbf",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "9519899e-c246-474e-8fd6-7dd16cf27a5b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4d758715-79d5-4c2e-94d2-d1cfe1bdda6d": {
      "main": [
        [
          {
            "node": "18f030a6-7333-45df-af1d-f8c5492084c6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "690c002c-8641-4bb9-8c55-8b5cd6f01f2c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30ff7c89-7fb6-4daf-b7f2-d178ee702243": {
      "main": [
        [
          {
            "node": "26cb9d6e-6a73-4a27-805d-8577c84101fa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "18f030a6-7333-45df-af1d-f8c5492084c6": {
      "main": [
        [
          {
            "node": "db38b578-1078-4a89-b429-55ba337a21fc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

중급 - 디자인, 인공지능

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
중급
노드 수10
카테고리2
노드 유형5
난이도 설명

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34