Skip to main content

Generate and Edit Images with OpenAI's GPT-Image-1 Model

Workflow preview

Workflow preview
100%
Generate and Edit Images with OpenAI's GPT-Image-1 Model preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This template integrates OpenAI's image generation and editing endpoints via the GPT Image 1 model to visually create and manipulate images based on prompts. It features base64 conversion, binary h...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.converttofile, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Edoardo Guzzi.

Original n8n.io source

1.1 Workflow description

Title
Generate and Edit Images with OpenAI's GPT-Image-1 Model
Workflow name
Generate and Edit Images with OpenAI's GPT-Image-1 Model

This template integrates OpenAI's image generation and editing endpoints via the GPT-Image-1 model to visually create and manipulate images based on prompts. It features base64 conversion, binary handling, and prompt chaining.

Perfect for marketing, design, product visuals and creative workflows.

🛠️ Requirements OpenAI account with access to gpt-image-1(probably you need organizations verifications for access to that model)

OpenAI API credentials configured in n8n

A self-hosted or cloud n8n instance

Basic familiarity with the n8n UI (no programming required)

🔧 Step-by-step Instructions

Step 1: Manual Trigger Starts the workflow on click. Ideal for testing the generation and edit logic.

Step 2: Generate Image The Create image call node sends a prompt to OpenAI and returns a base64 image.

Example prompt:

A cyberpunk city at night with flying cars and neon lights

Step 3: Convert to Binary The base64 image is converted into a usable binary PNG file with the Convert json binary to File node.

Step 4: Edit the Image The binary file is passed to OpenAI’s /images/edits endpoint. A new prompt applies changes to the image.

Example:

Add a glowing robot in the foreground with a neon sword

✅ Supports model: gpt-image-1 ⚠️ Requires binary file (not base64)

Step 5: Final Conversion Converts the final edited image from base64 to file so it can be downloaded or used in other nodes.

🎯 Real-World Use Cases 🎨 Artists & Creators: concept art and illustration variations

🛍️ E-commerce: auto-generate product mockups

📰 Marketing: create eye-catching blog or social visuals

💡 Bonus Ideas Add a Telegram or Slack node to generate or edit images via chat

Use a Webhook to feed prompts from a form or frontend

Add a mask to restrict edits to specific areas (e.g., background only)

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Test workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Edit Image (OpenAI)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Create image call

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 4 - Convert json binary to File

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 5 - Convert json binary to File final

Type / Role
n8n-nodes-base.convertToFile - convertToFile
Config choices
Version 1.1

Block 6 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate and Edit Images with OpenAI's GPT-Image-1 Model
Complexity intermediate
Nodes 11
Categories Content Creation, Multimodal AI
Author Edoardo Guzzi
Published 24 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3696/3696.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate and Edit Images with OpenAI's GPT-Image-1 Model do?

This template integrates OpenAI's image generation and editing endpoints via the GPT Image 1 model to visually create and manipulate images based on prompts. It features base64 conversion, binary h...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.