Azure OpenAI Image icon

Azure OpenAI Image

Generate or edit images using Azure OpenAI (DALL-E 3 / gpt-image-2)

Actions2

Generate

AI-generated

Summary

Generate images from a text prompt using a classic Azure OpenAI deployment or an Azure AI Foundry Services Gateway model. Return each generated image as binary data in a separate n8n item.

Inputs

  • endpointType — Choose classic Azure OpenAI or Services Gateway; defaults to classic. Determines the endpoint and authentication header.
  • resourceName (required) — Azure resource name used to construct the endpoint hostname.
  • deploymentName (required) — Required for classic endpoints; defaults to gpt-image-2. Also determines quality conversion by whether the name contains 'gpt-image-2', case-insensitively.
  • apiKey (required) — Sent as the api-key header for classic endpoints or a Bearer token for Services Gateway.
  • apiVersion (required) — Required for classic endpoints; defaults to 2025-04-01-preview. Sent as the api-version query parameter.
  • model — Gateway-only model selection: gpt-image-2 (default) or custom.
  • customModel (required) — Required when the gateway model is custom. Exact model ID sent in the request.
  • prompt (required) — Text description of the image to generate.
  • size — Requested dimensions: 1024x1024 (default), 1024x1792, or 1792x1024.
  • quality — Defaults to auto. When the deployment or model ID contains 'gpt-image-2', standard becomes auto and hd becomes high. Otherwise, auto/low/medium become standard and high becomes hd.
  • outputFormat — Requested image format: png (default) or jpeg. Also sets the output filename extension and MIME type.
  • outputCompression — Compression value sent to the API, from 0 to 100; defaults to 100.
  • n — Requested number of images per input item, from 1 to 10; defaults to 1.
  • outputBinaryField — Binary field that stores each generated image; defaults to image.

Output shape

A list of n8n items, one per supported image returned, each containing JSON metadata and a binary image.

JSON contains success, prompt, size, resolved quality, and the zero-based image index. Images are decoded from b64_json or string result fields, or downloaded from returned URLs. Filenames use generated_image__.. Original input fields are not copied. Entries without a supported image field are skipped; an empty image response raises an error. With Continue On Fail enabled, errors produce an item containing success: false and error.

Links

Discussion