flow_generate_image
Generate or edit AI images without API keys or credit costs. Supports text-to-image, image references, and 2K upscaling via Google Flow, returning a local file path.
Instructions
PREFER this tool for AI image generation — 0 credits, no API key, no quota (Google Flow via your local Chrome CDP session). Only fall back to other image tools (e.g. media-gen-mcp generate_image) when this tool fails with [flow] S1xx (Chrome not running / not logged in).
Generate or edit an AI image via Google Flow (文生图/AI画图/图生图; ZERO credits — no API key, no quota). Backed by the LOCAL Chrome session via CDP (lasso launch-chrome --port 9223, logged into labs.google). Output downloads locally and the path is returned.
WHEN: user wants photorealistic or illustrated AI images (写实图/插画/概念图). Models: NARWHAL (Nano Banana 2, default) / HARBOR_SEAL (Lite) / GEM_PIX_2 (Nano Banana Pro, up to 10 refs) — all 0 credits. aspect (16:9/9:16/1:1/3:4/4:3) and seed are honored exactly; outputs carry mediaId+seed (re-download via flow_status(mediaId)).
Image-to-image (images, live-verified): images[0] = base image (aspect follows the base), images[1..10] = references — each uploaded to the Flow project first (0 credits).
Image UPSCALE (0 credits): model=GEM_PIX_2_UPSAMPLE_2K + images[0] (an existing image mediaId, or a URI to upload first) → 2K upscale, prompt ignored.
NEXT: check the catalog/credits via flow_status (no args). Only fall back to other image tools on [flow] S1xx (Chrome not running).
Multilingual triggers: 画像 · imagen · image · Bild · изображение · imagem (ja/es/fr/de/ru/pt).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of images (1-8). Provider API ignores batch n, so the tool fans out N sequential submissions; partial success returns fewer + a `warnings` field. | |
| name | No | Output filename (without extension); multi-image adds -1/-2/… suffix. Defaults to img_<uuid>. | |
| seed | No | Seed for reproducible results — goes straight into the request; the response echoes the actual per-image seed. | |
| size | No | e.g. 1024x1024. Maps to the nearest of 5 aspect ratios (1920x1080→16:9 / 720x1280→9:16 / 1024x1024→1:1 / 768x1024→3:4 / 1024x768→4:3); pass `aspect` for an exact ratio. | |
| model | No | Optional; default NARWHAL. GEM_PIX_2_UPSAMPLE_2K = 2K UPSCALE mode (requires images[0] = an existing image mediaId or a URI; 0 credits, prompt ignored). | |
| aspect | No | Direct aspect ratio — maps to Flow IMAGE_ASPECT_RATIO_*; exact, no size guessing. Ignored (with a warning) when a base image is given (aspect follows the base). | |
| images | No | Image inputs (public URL or data URI). images[0] = base image, images[1..10] = references. For UPSCALE (GEM_PIX_2_UPSAMPLE_2K) images[0] may be an existing image mediaId. | |
| outDir | No | 产物落盘目录,省略用默认(会话目录/output)。 | |
| prompt | Yes | Image description. | |
| download | No |