DALL·E Image Generator
The DALL·E Image Generator lets you turn words into pictures.
Just type a description, pick a style and size, and the component will ask OpenAI’s DALL·E service to create the image for you. It can also turn an existing image into a new version or tweak it with a new prompt.
How it Works
When you run the component, it sends your prompt, chosen model, quality, size, and style to the OpenAI DALL·E API.
OpenAI processes the request and returns a binary image file. The component then hands that file back to the workflow as an Image output.
If you use the component as a tool for an AI agent, it also creates a Tool output that the agent can call later.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
The following fields are available to configure this component.
- Mapping Mode: Turn on or off the ability to process many records at once.
- Image Model: Choose which DALL·E model to use (e.g., “dall-e-2” or “dall-e-3”).
- Prompt: A text description of the image you want. The maximum length is 4000 characters.
- Quality: Pick the image quality level (e.g., “Standard” or “HD”).
- Size: Select the dimensions of the generated image. The available sizes depend on the chosen model.
- Style: Choose a visual style for the image (e.g., “Photorealistic”, “Cartoon”).
- Tool Name: The name that will appear to an AI agent when this component is used as a tool.
- Tool Description: A detailed description of what the tool does, helping the agent decide when to use it.
- Tools arguments metadata: Defines the arguments that the tool accepts, so the agent knows what data to pass.
Credential
This component requires an OpenAI API credential.
- First, add an OpenAI API credential in Nappai’s Credentials section.
- Then, select that credential in the component’s Credential field.
The credential stores your OpenAI API key securely; it is not shown in the input list.
Outputs
- Image – A binary image file created by DALL·E.
- Tool – A tool object that can be called by an AI agent to generate images on demand.
Usage Example
- Drag the DALL·E Image Generator onto the canvas.
- Enable Mapping Mode if you want to generate images for many records.
- Set Image Model to “dall-e-3”.
- In Prompt, type “A serene beach at sunset with palm trees”.
- Choose Quality “HD”, Size “1024x1024”, and Style “Photorealistic”.
- Connect the Image output to a Display Image component or a Save File component.
- Run the workflow. The component will call OpenAI, receive the image, and pass it along.
Related Components
- Image Resizer – Adjust the dimensions of an existing image.
- Image Editor – Apply filters or crop images.
- Text to Image – A simpler component that only uses a prompt without style or quality options.
Tips and Best Practices
- Keep prompts clear and concise; longer prompts can be truncated.
- Use the Quality and Size options that match your final use case to avoid unnecessary costs.
- When using Mapping Mode, test with a small batch first to ensure the data mapping works correctly.
- Store the generated images in a dedicated folder for easy retrieval.
Security Considerations
- The OpenAI API key is stored securely in Nappai’s credential store and never exposed in the workflow.
- All image data is transmitted over HTTPS to OpenAI’s servers.
- If you share the workflow, the credential is not included; recipients must add their own OpenAI API key.