Generate Custom AI Images with OpenAI GPT-Image-1 Model

n8n AI Content Creation Engineering

Contributed by Sabrina Ramonov 🍄. From the community directory at agents.sabrina.dev, republished with permission and full credit.

How it works

Trigger the workflow manually via the n8n UI.

Define key parameters like the image prompt, number of images, size, quality, and model.

Send a POST request to OpenAI’s image generation API using those inputs.

Split the API response to handle multiple images.

Convert the base64 image data into downloadable binary files.Set up steps

Initial setup takes around 5-10 minutes. You’ll need an OpenAI API key, a configured HTTP Request node with credentials, and to customize the prompt/parameter fields in the “Set Variables” node. No advanced config or external services needed.Important Note

You have to make sure to complete OpenAI's new verification requirements to use their new image API.

It only takes a few minutes and does not cost any money.

Tools used: OpenAI

Download the workflow template (JSON)

Original tutorial

Want this running in your business? KOBA42 builds and operates automations like this one.