--- name: veo-video-gen description: Generate cinematic videos with Google's Veo 3.1 (Gemini API) — text→video and image→video, pairing with the gpt-image-gen-2 still as the first frame. Quotes the exact $ cost before every call (flat per-second), supports true-loop (first=last frame) and web-ready MP4/WebM/poster output, and bakes in the play-once hero pattern and RAI-wording guidance. Triggers on "generate a video", "veo", "animate this image", "image to video", "cinematic hero video", "make a background video", "loop this image", "video from a still", or any motion/clip request. --- # veo-video-gen Turn a still (or a text brief) into a cinematic Veo 3.1 clip, quote the cost up front, and optionally produce web-ready files. The natural pairing for `gpt-image-gen-2`: generate a hero **still** there, animate it here. See `PROMPTING.md` for the full prompt guide and the hard-won RAI rules. **Setup:** TypeScript CLI (`cli.ts`) — run `pnpm install` in this directory once (Node ≥ 18). Auth: `GEMINI_API_KEY` in `~/.config/veo-gen/env` as `export GEMINI_API_KEY=…`, or exported in your shell. `ffmpeg` is optional (only for `--web`). Usage log at `~/.config/veo-gen/usage.jsonl`. ## Your job 1. **Classify** the request: `text→video` (no source image) or `image→video` (animate a still — the default for heroes; use the gpt-image-gen-2 PNG). 2. **Decide loop vs play-once.** Default to **play-once** (let the clip play and freeze on the last frame in the page — drop the HTML `loop` attr). Only use a real loop (`--loop`) for genuinely ambient/cyclical motion. 3. **Assemble the prompt** per `PROMPTING.md` (Subject · Action · Camera · Composition · Focus · Ambiance · Style). For a background hero: ONE subtle beat, and explicitly negate the "AI glow" (no god-rays/beams/glow/dust). 4. **Check the wording for RAI risk** (body/physique words + a person = likely rejection). The CLI warns; reword to neutral before spending. 5. **Quote the cost** (`--dry-run`) and show the user, then generate. 6. **Deliver:** with `--web`, hand back the MP4 + WebM + poster and the `