A lightweight image generation tool using OpenAI’s DALL·E models, wrapped in a clean and simple Gradio interface. No server setup, no bloated dependencies — just plug in your API key and start generating high-quality AI images with ease.
DALL·E is a text-to-image generation model developed by OpenAI. It translates natural language prompts into realistic or artistic images.
- Released in 2022.
- Generates square images (256×256, 512×512, or 1024×1024).
- Cheaper, faster, and useful for quick ideas.
- Has more limitations with detail and coherence in complex prompts.
- Released in 2023.
- Vastly improved scene understanding and image quality.
- Supports multiple aspect ratios: square, portrait, and landscape.
- Ideal for storytelling, characters, and nuanced prompts.
- More expensive, but produces stunning results with better consistency.
This project is a minimalist, no-nonsense desktop UI for generating images using DALL·E 2 and 3 via the OpenAI API.
- ✅ Switch between DALL·E 2 and DALL·E 3
- ✅ Choose from supported image sizes (auto-validated)
- ✅ Simple, intuitive Gradio UI
- ✅ Local saving of generated images
- ✅ View and copy the OpenAI-hosted image URL
- ✅ Error handling for API failures or invalid settings
- Python 3.9 or newer
- An OpenAI API key with image generation access
-
Clone this repo or download the ZIP.
-
Add your OpenAI API key to a
.envfile:OPENAI_API_KEY=sk-yourkeyhere -
Run the bundled installer:
setup.bat
This will:
- Create a virtual environment
- Install all dependencies from
requirements.txt - Activate the environment
-
To launch the app later, just run:
launch.bat
pip install -r requirements.txt
python app.py| Model | Image Sizes (width × height) |
|---|---|
dall-e-3 |
1024×1024, 1024×1792, 1792×1024, 896×1152, 1152×896 |
dall-e-2 |
256×256, 512×512, 1024×1024 |
Invalid model–size combos are auto-blocked by the app.
- The resulting image is saved as
generated_image.pngby default. - You can easily modify the code to generate timestamped filenames.
- A link to the OpenAI-hosted image is also displayed for convenience.
Here are some fun things to try:
"a cyberpunk dragon perched on a neon-lit skyscraper""steampunk airship flying over a jungle valley during sunset""an astronaut relaxing on Mars with a cold soda"
DALL·E 3 especially shines with long, descriptive prompts.
- Your API key stays local in the
.envfile. - No data is tracked, stored, or logged beyond your own machine.
- The OpenAI-hosted image URLs are temporary and not publicly listed.
This tool is powerful — please use it responsibly.
- Do not use it to generate deepfakes, hateful, violent, or illegal content.
- Do not attempt to bypass OpenAI’s content filters.
- Respect OpenAI’s Usage Policies.
- Be transparent when using AI-generated images in public-facing work.
- Never use AI art to impersonate real people or mislead audiences.
Use creativity ethically, not deceptively.
MIT License — use it, fork it, break it, improve it. Just don’t sell it as your own.
Made by @raxephion
Powered by OpenAI and Gradio
Tested on Windows 11, Python 3.11+
Happy prompting! 🚀