A modern web application built with Next.js that provides an intuitive interface for generating AI images using the Flux API. The application offers advanced customization options and supports multiple Flux models. This is a BYOK (Bring Your Own Key) application, which means you can use your own Flux API key to generate images. Get it here https://docs.bfl.ml/
- 🎨 Support for multiple Flux AI models:
- Flux Pro 1.1
- Flux Pro
- Flux Dev
- Flux Pro 1.1 Ultra
- 🛠️ Advanced image generation controls:
- Customizable dimensions (width/height)
- Aspect ratio selection for Ultra model
- Adjustable guidance scale
- Safety tolerance settings
- Prompt upsampling option
- Custom seed support
- 💫 Real-time image generation
- 📥 Direct image download capability
- 🎯 Responsive design with dark mode UI
- Node.js 18.0 or higher
- npm or yarn
- Flux API key
- Clone the repository:
git clone [repository-url]
cd flux_image_gen
- Install dependencies:
npm install
- Configure your API key:
- Create a copy of
example.config.json
and name itconfig.json
- Add your Flux API key to the configuration file
- Create a copy of
Run the development server:
npm run dev
Open http://localhost:3000 to access the application.
- Select a Flux model from the dropdown menu
- Enter your image generation prompt
- Adjust generation parameters:
- For standard models: Set width and height
- For Ultra model: Choose aspect ratio
- Configure additional parameters like guidance scale, safety tolerance, and steps
- Click "Generate Image" to create your image
- Use the download button to save generated images
src/
├── app/ # Next.js app directory
│ ├── page.tsx # Main image generation interface
│ └── api/ # API routes
├── lib/ # Utility functions
│ ├── flux-api.ts # Flux API integration
│ └── config.ts # Configuration management
└── public/ # Static assets
- Next.js - React framework
- Tailwind CSS - Utility-first CSS framework
- Axios - HTTP client
- Flux API - AI image generation service
The application requires a Flux API key for authentication. Configure this in your .env.local
file:
NEXT_PUBLIC_FLUX_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
This project is licensed under the MIT License.