AI Image Generator Flow
Setup
-
Install Dependencies:
npm install -
Environment Variables: A
.envfile has been created. Ensure the following keys are correct:R2_ACCOUNT_ID: Your Cloudflare Account ID.R2_ACCESS_KEY_ID: Your R2 Access Key ID.R2_SECRET_ACCESS_KEY: Your R2 Secret Access Key.R2_BUCKET_NAME: The name of your R2 bucket (Default:ai-flow).API_KEY: Your Wuyin Keji API Key.
-
Run Server:
node server.jsAccess at
http://localhost:3000.
Features
- Upload: Uploads reference images to Cloudflare R2.
- Prompt Generation: Uses LLM to generate prompts based on
prompt.mdtemplate. - Image Generation: Uses NanoBanana to generate images from prompts.
- History: Saves generated images and prompts locally.
- Batch Download: Download all generated images.
Notes
- Ensure your R2 bucket allows public access or configure a custom domain in
.envasR2_PUBLIC_DOMAIN. - The application saves state to browser
localStorageto prevent data loss on refresh.
Description
Languages
JavaScript
86.6%
HTML
13.4%