Library / Image, Video & Audio
Image, Video & Audio
Generate and Edit Images with OpenAI GPT-Image-1
When you run it, OpenAI's gpt-image-1 model creates an image from a prompt and edits an existing image, saving both as files.
What it does
## 🧠 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!
The steps
- When clicking ‘Test workflow’
- Edit Image (OpenAI)
- Create image call
- Convert json binary to File
- Convert json binary to File final
Similar automations