A simple application that allows you to generate images using the Flux API. This interface lets you input prompts, adjust advanced options, and view and save the generated images directly.
-
Prerequisites
-
Installation
-
Configuration
-
Starting the Server
-
Usage
-
Additional Information
-
Troubleshooting
-
Contact
Ensure you have the following software installed:
-
Node.js (version 14 or higher)
-
A Flux API key (available at https://api.bfl.ml/)
Follow the steps below to install the application:
- Clone the Repository Clone the repository to your local machine:
git clone https://github.com/yourusername/flux-api-interface.git
Navigate to the project directory:
cd flux-api-interface
- Install Dependencies Install the required npm packages:
npm install
- Edit the
.env
File In the root of the project, and replaceyour_flux_api_key
with your actual Flux API key.
API_KEY=your_flux_api_key
- Verify Configuration Ensure all variables are correctly set. You can adjust the
PORT
variable if you wish to run the server on a different port.
Start the application with the following command:
npm start
If everything is set up correctly, you should see the following message:
Server is running on http://localhost:3000
-
Open the Interface Open your web browser and navigate to
http://localhost:3000
to use the application. -
View Results
-
While the image is being generated, you will see a status message.
-
Once the image is ready, it will be displayed on the page.
-
Click on the image to view it in a larger window.
-
The generated image is automatically saved in the
public/images
folder.
- Directory Structure
project-directory/
├── .env
├── server.js
├── routes.js
├── package.json
├── public/
│ ├── index.html
│ └── images/
├── README.md
└── ...
-
Images All generated images are saved in the
public/images
directory. This directory is automatically created if it doesn't exist. -
Author and License
-
Author: Hegeneer
-
License: Unlicense (free for everyone, may be used, modified, and sold freely)
-
-
Sponsor This application is sponsored by hegecoin.com .
-
API Errors If you encounter issues generating images, ensure your API key is correct and that you have sufficient credits with the Flux API provider.
-
Port Issues If the server fails to start due to port issues, check that the specified port is not already in use or change the
PORT
variable in the.env
file. -
Dependencies Ensure all npm dependencies are installed correctly. You may run
npm install
again if necessary.
If you have questions or need assistance, please contact me on telegram https://t.me/hegeneer .
I am currently working on enhancing the application with several new features. These include the ability to generate multiple images with a single prompt in one click, save prompts for future use, and a revamped interface for a more streamlined user experience. Additionally, I'm integrating prompt enhancement powered by OpenAI, improved batch processing capabilities, and a history feature for tracking and reusing previous prompts
Enjoy!