{
  "name": "Generate Minimalist T-shirt Images (Gemini 2.0)",
  "nodes": [
    {
      "parameters": {},
      "id": "1",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        200,
        300
      ]
    },
    {
      "parameters": {
        "prompt": "\u8bf7\u6839\u636e\u4ee5\u4e0b\u8f93\u5165\u5185\u5bb9\uff08\u5356\u70b9\u548c\u7528\u6237\u753b\u50cf\uff09\uff0c\u751f\u6210\u56db\u4e2a T \u6064\u56fe\u50cf\u7c7b\u578b\u7684\u7b80\u77ed\u82f1\u6587\u63d0\u793a\u8bcd\uff0c\u6bcf\u4e2a\u63d0\u793a\u8bcd\u4e00\u884c\uff0c\u5206\u522b\u662f\uff1a\u4e3b\u56fe\uff08Main\uff09\u3001\u573a\u666f\u56fe\uff08Scene\uff09\u3001\u7ec6\u8282\u56fe\uff08Detail\uff09\u3001\u6a21\u7279\u56fe\uff08Model\uff09\u3002\u8f93\u5165\u5185\u5bb9\uff1a{{$json[\"input\"]}}"
      },
      "id": "2",
      "name": "GPT-4o Generate Prompts",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 2,
      "position": [
        500,
        300
      ],
      "credentials": {
        "openAiApi": "<your credential>"
      }
    },
    {
      "parameters": {
        "propertyName": "prompts",
        "splitInto": "lines",
        "dataPropertyName": "data"
      },
      "id": "3",
      "name": "Split Prompts",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 2,
      "position": [
        800,
        300
      ]
    },
    {
      "parameters": {
        "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent",
        "options": {},
        "sendBody": true,
        "jsonParameters": true,
        "bodyParametersJson": "={\"contents\": [{\"parts\": [{\"text\": \"\u5c06\u4ee5\u4e0b\u8bbe\u8ba1\u56fe\u6848\u5370\u5728T\u6064\u4e2d\u592e\uff0c\u751f\u6210\u4e00\u5f20{{$json[\"data\"]}}\u56fe\u3002\u6781\u7b80\u98ce\u683c\uff0c\u4e13\u4e1a\u4ea7\u54c1\u6444\u5f71\u98ce\u683c\uff0c2000x2000\uff0c\u9ad8\u5206\u8fa8\u7387\u3002\"}]}]}",
        "queryParametersJson": "{\"key\": \"{{ $env.GEMINI_API_KEY }}\"}",
        "responseFormat": "file",
        "options.responseFileName": "={{$json[\"data\"]}}.png"
      },
      "id": "4",
      "name": "Gemini Generate Image",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        1100,
        300
      ]
    },
    {
      "parameters": {
        "operation": "compress",
        "binaryPropertyName": "data"
      },
      "id": "5",
      "name": "Archive ZIP",
      "type": "n8n-nodes-base.archive",
      "typeVersion": 1,
      "position": [
        1400,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "return [{ json: { message: '\u751f\u6210\u5b8c\u6210', download: $binary.data } }];"
      },
      "id": "6",
      "name": "Return File",
      "type": "n8n-nodes-base.function",
      "typeVersion": 2,
      "position": [
        1650,
        300
      ]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "GPT-4o Generate Prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT-4o Generate Prompts": {
      "main": [
        [
          {
            "node": "Split Prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Prompts": {
      "main": [
        [
          {
            "node": "Gemini Generate Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini Generate Image": {
      "main": [
        [
          {
            "node": "Archive ZIP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Archive ZIP": {
      "main": [
        [
          {
            "node": "Return File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {},
  "staticData": {},
  "tags": []
}