Skip to content

Generate Image via Dall-E (Azure OpenAI) v1.0.0 Help

Creates an image from a text prompt using Azure OpenAI Service.

How can I use the Step?

The Step is ideal for generating creative and unique images for various applications, including web content, marketing, and interactive media. You can integrate this Step into automated workflows for dynamic image generation based on user inputs or data.

How does the Step work?

Set up authorization, enter a text prompt, and adjust the parameters. Taking your inputs, the Step requests the Azure image generation API and returns the URLs of the generated images.

To learn more, see Generate images with Azure OpenAI Service.

Prerequisites

Before using this Step, ensure the following prerequisites are met:

  • An active Azure subscription.
  • Access to DALL·E within your Azure subscription.
  • An Azure OpenAI resource created in a specific region.
  • For using DALL·E 3, deployment of a dalle3 model is required.

For detailed instructions and additional information on these prerequisites, refer to Azure DALL-E Prerequisites.

Authorization

To authorize the Step, you can inherit authorization from the previous Step or select/create a new authorization in the current Step.

To create a new authorization, follow these steps:

  1. For the authorization options, pick Select authorization in current Step.
  2. In the list of authorizations, select Create a new authorization.
  3. In the Add authorization modal, do the following:
    • Name your new authorization.
    • Enter the API key and endpoint of your Azure OpenAI resource.
    • Click Add to confirm.

For detailed instructions on how to find your Azure OpenAI resource's API key and endpoint, see Retrieve key and endpoint.

Request settings

The request settings reflect the Azure image generation API and include the following:

  • Model: DALL·E model for image generation.
  • Deployment ID: The name of your DALL·E 3 model deployment, such as MyDalle3. You're required to first deploy a DALL·E 3 model before you can make calls.
  • Prompt: The text description used as the basis for image generation or editing. If you select the DALL·E 3 model, it automatically re-writes this prompt for safety reasons and to add more detail. The updated prompt is visible in the revised_prompt field of the data response object.
  • Size: The dimensions of the generated images.
  • Number of images in response: The count of images to generate, defaulting to 1 for DALL·E 3 and allowing up to 10 for DALL·E 2 model.
  • Quality: The quality setting for the generated image.
  • Style: The visual style of the generated image.

Note: The Azure image generation APIs come with a content moderation filter. If Azure OpenAI recognizes your prompt as harmful content, it doesn't return a generated image. For more information, see Content filtering.

Merge field settings

The Step returns the result as a JSON object and stores it under the Merge field name. To learn more about Merge fields and how to work with them, see our Merge fields guide.

Output example

For the DALL·E 2 model, the output contains the timestamp and URL of the generated image. For the DALL·E 3, the data object also includes the revised prompt:

json
{
    "created": 1701122021,
    "data": [
        {
            "revised_prompt": "",
            "url": ""
        }
    ]
}
{
    "created": 1701122021,
    "data": [
        {
            "revised_prompt": "",
            "url": ""
        }
    ]
}

Error Handling

By default, the Step handles errors using a separate exit. So if any error occurs during the Step execution, the Flow proceeds down the error exit. For more information, see Error and timeout handling.

Reporting

The Step automatically generates Reporting events during its execution, allowing for real-time tracking and analysis of its performance and user interactions. To learn more, see Reporting events

Service dependencies

  • flow builder - v2.28.3
  • event-manager - v2.3.0
  • deployer - v2.6.0
  • library v2.11.3
  • studio v2.64.1

Release notes

v1.0.0

  • Initial release