AutomationFlowsWeb Scraping › Generate Character-Consistent AI Images with Kie.ai

Generate Character-Consistent AI Images with Kie.ai

Original n8n title: Generate Character-consistent AI Images with Kie.ai Nano Banana API

Bydamo @zengyichao on n8n.io

Generate high-quality, character-consistent AI images using KIE.AI's Nano Banana API through an intuitive form interface. This n8n workflow supports both text-to-image and image-to-image generation modes, delivering professional results at 50% lower cost than mainstream…

Event trigger★★★★☆ complexity10 nodesHTTP RequestForm Trigger
Web Scraping Trigger: Event Nodes: 10 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #8019 — we link there as the canonical source.

This workflow follows the Form Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "awXlFcUvfBcnAfxo",
  "name": "banana",
  "tags": [],
  "nodes": [
    {
      "id": "c9f57cdf-e8d4-4612-a015-005af994b753",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        16
      ],
      "parameters": {
        "width": 780,
        "height": 152,
        "content": "## STEP 1 - GET API KEY (YOURAPIKEY)\n- Create an account [here](https://kie.ai/) and obtain API KEY.\n- It will be used in on form submission.\n- Important: Please keep your key safe and do not disclose it to others."
      },
      "typeVersion": 1
    },
    {
      "id": "42df80e0-3428-40f9-a951-9390723f4aaa",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        256
      ],
      "parameters": {
        "width": 780,
        "height": 212,
        "content": "## STEP 2 - Usage Process\n1. **Start Workflow** - Click \"Execute workflow\" button to begin the task.\n2. **Fill Form** - Complete the required fields in the popup form.\n3. **Submit - Click** \"Submit\" button to send your request.\n4. **Close Window** - You can close the form window after successful submission.\n5. **Wait for Generation** - System automatically checks status every 5 seconds.\n6. **Get Results** - Video files will be displayed automatically when generation is complete."
      },
      "typeVersion": 1
    },
    {
      "id": "9dea92a7-21b2-42e7-96ce-714f5ea44024",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 3,
        "width": 956,
        "height": 1160,
        "content": "## Generate Character-Consistent Images with KIE.AI Nano Banana API\n### Overview\nGenerate high-quality, character-consistent AI images using KIE.AI's Nano Banana API through an intuitive form interface. This n8n workflow supports both text-to-image and image-to-image generation modes, delivering professional results at 50% lower cost than mainstream platforms.\n**Key Benefits:**\n- \ufffd\ufffd Dual generation modes (text-to-image & image-to-image).\n- \ud83d\udcb0 20 free generations + $0.02 per additional request.\n- \ud83d\udd04 Maintains character consistency across generations.\n- \u26a1 Automated processing with 5-second polling.\n### Perfect for\nContent creators, designers, marketers, developers, and anyone who needs to quickly create diverse AI visual content while maintaining consistent character identity across multiple generations.\n### Prerequisites\n- KIE.AI account and API key ([Sign up here](https://kie.ai/nano-banana)).\n- Active n8n instance with form submission capabilities.\n- AI prompts for image generation.\n- Reference images (optional, for image-to-image mode).\n### Quick Setup\n#### 1. **Get API Key**\nRegister at [kie.ai/nano-banana](https://kie.ai/nano-banana) and generate your API key.\n#### 2. **Configure Form Fields**\nSet up these fields in your \"On Form Submission\" node:\n- **`model`** (Required): Choose between `google/nano-banana` for text-to-image or `google/nano-banana-edit` for image-to-image generation.\n- **`prompt`** (Required): Text description for your image generation.\n- **`img_url`** (Optional): Reference image URLs for image-to-image mode (up to 5 images, separate multiple URLs with commas).\n- **`api_key`** (Required): Your KIE.AI API key for authentication.\n#### 3. **Test & Use**\n1. Execute the workflow\n2. Access the generated form URL\n3. Fill in your details and submit\n4. Wait for processing (10-20 seconds)\n5. Results will be displayed automatically.\n### Usage Tips\n**Better Prompts:**\nInclude style (realistic, anime, cyberpunk), composition (close-up, wide shot), lighting (dramatic, soft), and mood (cheerful, mysterious).\n**Example:** \"Realistic cyberpunk character with neon blue lighting, close-up composition, dramatic shadows\"\n**Common Uses:**\n- Character design for games/stories\n- Social media content\n- Marketing materials\n- Product mockups\n### Troubleshooting\n- **API Key Invalid**: Verify key is correct and active.\n- **Generation Fails**: Check prompt length and content.\n**Keywords:** Nano Banana API, character-consistent images, text-to-image, image-to-image, KIE.AI, AI image generation, n8n template"
      },
      "typeVersion": 1
    },
    {
      "id": "5609cfa7-25e9-4f0e-908b-4fceb1fdd889",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1024,
        544
      ],
      "parameters": {
        "width": 780,
        "height": 568,
        "content": "## STEP 3 - Form Parameters\n1. **Prompt** \n    - Purpose: Describe the video content you want to generate.\n    - Example: \"A dog playing in a park\".\n    - Tips:\n    Be detailed and specific in describing image content.\n    More detailed descriptions lead to better results.\n2. **img_url** (Image-to-Image, Optional)\n    - Purpose: Provide an image URL for image-to-image generation. Note: If you are using text-to-image generation (google/nano-banana), please do not fill in this parameter.\n    - Example: https://file.example.com/your-image.jpg (single image) or https://file1.com/img1.jpg,https://file2.com/img2.jpg (multiple images)\n    - Tips:\n    Required for: google/nano-banana-edit (image-to-image).\n    Not needed for: google/nano-banana (text-to-image) - leave this field empty.\n    Use a clear and relevant image to guide the generation.\n    You can upload up to 5 images by separating multiple URLs with commas.\n3. **model (Model Type)** \n    - Purpose: Select the type of AI generation task you want to perform.\n    - Options: google/nano-banana (text-to-image)\ngoogle/nano-banana-edit (image-to-image)\n    - Tips:Choose google/nano-banana for text-to-image generation. Choose google/nano-banana-edit for image-to-image generation.\n4. **api_key** (API Key)\n    - This is what you get in the first step.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b41cc4b4-2927-4453-80fd-7252549af77e",
      "name": "Obtain the generated status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        992,
        1184
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/playground/recordInfo",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "taskId",
              "value": "={{$json.data.taskId}}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer {{$node[\"Submit Text Prompt for image Generation\"].json[\"api_key\"]}}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "421dd0c7-92c9-439e-a157-70d6120b6282",
      "name": "Submit Text Prompt for image Generation",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        320,
        1184
      ],
      "parameters": {
        "options": {},
        "formTitle": "AI image generator",
        "formFields": {
          "values": [
            {
              "fieldLabel": "prompt"
            },
            {
              "fieldLabel": "img_url"
            },
            {
              "fieldLabel": "model"
            },
            {
              "fieldLabel": "api_key"
            }
          ]
        },
        "formDescription": "Please fill in the following information to generate your video"
      },
      "typeVersion": 2.2
    },
    {
      "id": "e8209f72-eb14-40e2-a4fa-19da7d6d5e6f",
      "name": "Send image Generation Request to KIE.AI API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        544,
        1184
      ],
      "parameters": {
        "url": "https://api.kie.ai/api/v1/playground/createTask",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"model\": \"{{$json.model}}\",\n  \"callBackUrl\": \"https://your-domain.com/api/callback\",\n  \"input\": {\n    \"prompt\": \"{{$json.prompt}}\",\n    \"image_urls\": [{{$json.img_url ? $json.img_url.split(',').map(url => '\"' + url.trim() + '\"').join(',') : ''}}]\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer {{$json.api_key}}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "87befe8e-1318-44c6-8600-a30f7d629f87",
      "name": "Wait for image Processing Completion",
      "type": "n8n-nodes-base.wait",
      "position": [
        784,
        1184
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "63a42df0-8d20-47ac-a4f8-c8006ef985c7",
      "name": "Check if image Generation is Complete",
      "type": "n8n-nodes-base.if",
      "position": [
        832,
        1408
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "db9a5dec-997b-4c3f-9582-37c9bbeb19ff",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "=true",
              "rightValue": "={{ $json.data.state == 'success'}}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a819dc4e-dcf2-463b-b0a5-daf38444edc9",
      "name": "Format and Display image Results",
      "type": "n8n-nodes-base.set",
      "position": [
        1200,
        1392
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e800cf57-0f11-448e-b86d-6454dced6c28",
              "name": "img",
              "type": "string",
              "value": "={{ $json.data.resultJson }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5a03f781-5476-497a-a705-8cc42d77ddff",
  "connections": {
    "Obtain the generated status": {
      "main": [
        [
          {
            "node": "Check if image Generation is Complete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for image Processing Completion": {
      "main": [
        [
          {
            "node": "Obtain the generated status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if image Generation is Complete": {
      "main": [
        [
          {
            "node": "Format and Display image Results",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for image Processing Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Text Prompt for image Generation": {
      "main": [
        [
          {
            "node": "Send image Generation Request to KIE.AI API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send image Generation Request to KIE.AI API": {
      "main": [
        [
          {
            "node": "Wait for image Processing Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Generate high-quality, character-consistent AI images using KIE.AI's Nano Banana API through an intuitive form interface. This n8n workflow supports both text-to-image and image-to-image generation modes, delivering professional results at 50% lower cost than mainstream…

Source: https://n8n.io/workflows/8019/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

This workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t

Execute Command, Read Write File, HTTP Request +3
Web Scraping

[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.

HTTP Request, GitHub, Stop And Error +1
Web Scraping

[](https://youtu.be/c7yCZhmMjtI)

HTTP Request, GitHub, Stop And Error +1
Web Scraping

N8n recently introduced folders and it has been a big improvement on workflow management on top of the tags.

HTTP Request, n8n, Form Trigger +1
Web Scraping

This workflow automates the creation of press releases for music artists releasing a new single. Upload your MP3, fill in basic info, and receive a publication-ready press release saved as a Google Do

Form Trigger, HTTP Request, Google Docs