DALL·E Image Generator
DALL·E Image Generator creates an image from a written description, using OpenAI’s image models. You write what you want to see, choose the model and the size, and the component returns the image as a file so the flow can send, save or publish it.
It can also be an agent tool: the agent then creates images when a user asks for one in the conversation.
When to use it
- Create the picture that goes with a social media post from the campaign text.
- Generate illustrations for a newsletter, a presentation or a blog post.
- Prepare one image for each product in a list, with Batch Mode.
- Give an assistant the ability to create images when the user asks for them in the chat.
Configuration
| Field | What it does |
|---|---|
| Credential (required) | The credential of the OpenAI API service. Pick one with Choose an option or create one with Add new credential. More in Credentials. |
| Image Model | The OpenAI model that creates the image: dall-e-2, dall-e-3 or gpt-image-1. Default: dall-e-2. |
| Prompt | The description of the image you want, up to 4000 characters. You can type it or connect the text of another component, for example a Prompt. |
| Quality | Image quality: standard or hd. Only the dall-e-3 model takes it into account. |
| Size | Image size in pixels: 1024x1024 (square), 1792x1024 (landscape) or 1024x1792 (portrait). Default: 1024x1024. Not every model accepts every size; 1024x1024 works with all of them. |
Batch processing
With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.
Using it as an agent tool
You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.
As a tool, the agent writes the description of the image and can choose the quality and the size.
Output
- Image: the image created, as a file. Connect it to components that receive files, for example the attachments of Gmail Message or Email, the file upload of Drive File Manager, or Describe Image.
- Tool: the component as a tool, to connect it to an agent’s Tools input. When the agent uses it, the image is saved with the conversation’s files and the agent receives its name and the link to view it.
Example
The marketing team of Panadería Lucero wants an image to announce its new rye bread:
- Add DALL·E Image Generator and choose the OpenAI API credential.
- Choose
dall-e-3in Image Model,hdin Quality and1792x1024in Size. - In Prompt, write: “A freshly baked loaf of rye bread on a wooden table, warm morning light, photographic style”.
- Connect Image to the attachments of a Gmail Message to send the proposal to the team.
Good practices
- Describe the object, the setting, the light and the style in concrete sentences.
- Try a single image before turning on Batch Mode with a long list: each image uses your OpenAI account.
- When you use it as a tool, explain in Tool Description what kind of images the agent should use it for.