aa33dea6384109fab438ac59a0e24424f3a237a2
nano-banano
To install dependencies:
bun install
Set up your environment:
cp .env.example .env
To run:
bun run src/index.ts "A tiny banana robot exploring a neon greenhouse"
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 - Uses AI SDK's
streamTextfor streaming text, then downloads the generated image from the streamed Markdown image link - Saves the generated image into
images/with a timestamp-based 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.
Description
Languages
TypeScript
100%