Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Image Generator

A web application that generates images from text prompts using the DALL·E 2 API

Node.js Express OpenAI License: MIT


Overview

AI Image Generator is a lightweight web application that takes a natural language description and returns a generated image using OpenAI's DALL·E 2 model. A Node.js + Express REST API handles communication with the OpenAI API and serves the result to a vanilla frontend.


Features

  • Text-to-Image Generation — Describe anything in plain English and get a generated image back
  • DALL·E 2 Integration — Powered by OpenAI's image generation model
  • REST API Backend — Node.js + Express endpoint handles all API communication
  • Minimal Frontend — Clean HTML/CSS/JS interface with no framework overhead

Tech Stack

Node.js Express OpenAI HTML5 CSS3 JavaScript


Layer Tools
Backend Node.js, Express
AI OpenAI DALL·E 2 API
Frontend HTML, CSS, JavaScript
Config dotenv

Getting Started

Prerequisites

  • Node.js 14+
  • An OpenAI API key
  • Terminal (use Git Bash or WSL on Windows)

Installation & Configuration

  1. Clone the repository

    git clone https://github.com/silentwraith03/ai-image-generator.git
    cd ai-image-generator
  2. Install dependencies

    npm i express openai dotenv
  3. Set up environment variables

    Create a .env file in the root directory:

    PORT=5000
    OPENAI_API_KEY=your_api_key_here
  4. Start the server

    npm run dev
  5. Open in browser

    Navigate to http://localhost:5000


Screenshots


License

Distributed under the MIT License. See LICENSE for details.

About

Web Application that uses DALL·E 2 to generate images from text prompt

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages