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

Nodes

818211a2-bc09-427d-bfa4-d8db9fbffb503b9f1b78-6b80-4575-aa6c-966987000389083a55c9-df56-4154-959f-52737890cad0

Created by

MaMax aka Mosheh

Last edited 9 days ago

How it works

  1. Trigger the workflow manually via the n8n UI.
  2. Define key parameters like the image prompt, number of images, size, quality, and model.
  3. Send a POST request to OpenAI’s image generation API using those inputs.
  4. Split the API response to handle multiple images.
  5. 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: https://help.openai.com/en/articles/10910291-api-organization-verification

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

New to n8n?

Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!