🎨 Image Generation (OpenAI)
Configured with Convert To File, HTTP Request. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Web / API
- Transform
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Edit Image (OpenAI) | Web / API | HTTP Request | POST |
| Create image call | Web / API | HTTP Request | POST |
| Convert json binary to File | Transform | Convert To File | toBinary |
| Convert json binary to File final | Transform | Convert To File | toBinary |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
openAiApi
Workflow notes
🧪 Manual Trigger
🧪 Manual Trigger
Starts the workflow manually. Ideal for testing and debugging purposes.
🎨 Image Generation (OpenAI)
🎨 Image Generation (OpenAI)
Sends a POST request to the OpenAI /v1/images/generations endpoint.
- Uses
gpt-image-1model - Generates an image from a given prompt
- Returns a base64-encoded image (
b64_json)
📌 Output: data[0].b64_json
🧾 Convert base64 to File
🧾 Convert base64 to File
Converts the b64_json field into a binary PNG file to use in the next step.
📤 Output: Binary image under the data field
✏️ Image Editing (OpenAI)
✏️ Image Editing (OpenAI)
Sends the binary image to OpenAI’s /v1/images/edits endpoint with a descriptive prompt.
- Model:
gpt-image-1 - Format:
multipart/form-data - Requires a real file (not base64)
- Supports optional
maskinput
📥 Input: Binary image from data
📤 Output: Edited image in b64_json
🧾 Final Conversion (base64 → File)
🧾 Final Conversion (base64 → File)
Converts the edited image (b64_json) into a downloadable or previewable PNG file.
📤 Output: Final binary image
🧠 Image AI Workflow Overview
🧠 Image AI Workflow Overview
This workflow uses OpenAI's image generation and editing APIs with the gpt-image-1 model.
🔑 Requirements:
- You must use your own OpenAI API key from https://platform.openai.com/account/api-keys
- Create a credential in n8n called
OpenAi AIFB account(or use your own name)
💰 Cost Warning:
- This model is powerful but expensive.
- Each image costs $0.020 to $0.190 depending on resolution and type.
- Always monitor your usage via the OpenAI dashboard
🔍 Why use gpt-image-1?
- Unmatched semantic control: you can edit specific parts of images with detailed prompts.
- Supports multiple input images, coherent edits, and future multi-modal tasks.
- Editing works with or without a transparency
mask.
🔧 Suggested Nodes to Expand Workflow:
- Webhook (trigger via your frontend or app)
- Telegram / Slack (prompt image generation from chat)
- Set node (inject dynamic prompts or user context)
- IF / Switch (change behavior depending on prompt type)
- Merge (combine multiple image generations)
- HTTP Request (send generated images to external APIs or CMS)
💡 Example Use Cases:
- Marketing teams: generate product visuals on demand
- Designers: edit and re-style illustrations without Photoshop
- E-commerce: dynamic generation of themed mockups
- Content creators: create blog and social thumbnails in bulk
⚠️ Don't forget to add rate limiting or batch controls if generating large volumes!
🎨 Image Generation (OpenAI)
🎨 Image Generation (OpenAI)
Purpose and structure
This folder contains the 🎨 Image Generation (OpenAI) workflow. Its executable nodes use convertToFile, httpRequest, manualTrigger. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Manual/0887_Manual_Stickynote_Create_Webhook.json MIT; preserve source notices.