1.1 KiB
1.1 KiB
nano-banano
To install dependencies:
bun install
Set up your environment:
cp .env.example .env
To run:
bun run src/index.ts
What it does:
- Reads
FLOW2API_BASE_URL,FLOW2API_API_KEY, andFLOW2API_MODELfrom.env - Accepts either a root endpoint or a
/v1endpoint and normalizes root URLs to the OpenAI-compatible/v1base URL automatically - Also accepts older
GEMINI_MODELandOPENAI_MODELenv names for compatibility - Reads batch jobs from
src/jobs.ts, where each item can definename,prompt,images, andenabled - Treats relative
imagesentries in each job as files under the localimages/directory - Sends
promptplus any local input images through AI SDK'sstreamText, then downloads the generated image from the streamed Markdown image link - Saves each generated image into
output/with a job-based timestamp filename - Keeps runtime code under
src/and uses the@/*TypeScript alias for internal imports
This project was created using bun init in bun v1.3.11. Bun is a fast all-in-one JavaScript runtime.