flow_generate_video
Submit AI video generation to Google Flow (text-to-video, image-to-video, reference, keyframes, edit) and receive a mediaId to poll status and download the mp4.
Instructions
🔴 BILLS GOOGLE FLOW CREDITS (abra 7-20 / veo lite 10 / fast 20 / quality 100 per clip; upsampler_1080p = 0). USE ONLY when the user explicitly asks for Flow / Veo / abra video (config flow.videoRouting=explicit-only — the default, credits red line).
Submit an AI video generation to Google Flow (文生视频/图生视频/首尾帧/参考图/延长/编辑/超分). SUBMIT-ONLY: returns a mediaId handle immediately (never blocks ~2-4min generation) — poll with flow_status(mediaId=…) until status=completed, then re-call with download=true to save the mp4.
Model = full usage key (live catalog via flow_status): t2v (text) / i2v (+image) / r2v (+images 1-10) / interpolation or _fl (+keyframes exactly 2) / extension (+videoMediaId, e.g. veo_3_1_extension_lite) / upsampler (+videoMediaId, veo_3_1_upsampler_1080p = 0 credits; 4k tier-locked) / edit (+videoMediaId + prompt = the edit instruction, abra_edit 20 credits, wire probe-verified). Mnemonic + durationSeconds also works (abra_t2v + 8 → abra_t2v_8s). durationSeconds ∈ {4,6,8,10}s (off-grid snaps nearest), ratio 16:9/9:16 only, ONE clip per call — repeat calls for x2-x4 (each bills credits and gets its own seed).
NEXT: flow_status (no args) for the live catalog with per-key creditsAtServiceTier before choosing a key; after submit, flow_status(mediaId=…) { download: true } polls & fetches.
Multilingual triggers: 動画 · vídeo · vidéo · Video · видео · vídeo (ja/es/fr/de/ru/pt).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Seed for reproducible results (random when omitted; echoed in raw). | |
| image | No | image-to-video: single image URL (http(s)/data:) — START_IMAGE, upload (0 credits) then submit; requires an i2v key (e.g. abra_i2v_8s / veo_3_1_i2v_lite). A t2v key + image → structured S301 telling you the key to use. | |
| model | No | REQUIRED unless configured in config.json providers.flow.models.video.default (deliberately no built-in default — video costs credits). Full usage key (e.g. abra_t2v_8s / veo_3_1_t2v_lite / veo_3_1_upsampler_1080p) or mnemonic+durationSeconds (abra_t2v + 8). Complete live catalog in flow_status. | |
| ratio | No | Video aspect ratio (16:9 default). Image ratios 1:1/4:3/3:4 are NOT supported for video (image generation supports them). | |
| images | No | Reference images: 1-10 image URLs (http(s)/data:) for r2v keys (e.g. abra_r2v_8s / veo_3_1_r2v_lite) — uploaded (0 credits) then submitted as referenceImages. Mutually exclusive with image/keyframes/videoMediaId. | |
| prompt | Yes | Video content description (for edit keys: the edit instruction, e.g. "make it snow"). | |
| frameRate | No | 固定 24(Flow 唯一帧率;schema 展示与约束同源)。 | |
| keyframes | No | Exactly 2 images (first + last frame; http(s)/data:), requires an interpolation/_fl key (e.g. veo_3_1_interpolation_lite / veo_3_1_i2v_s_fast_fl); other counts or key families → structured S301. | |
| numFrames | No | Allowed: 96/144/192/240 @24fps (96/144/192/240 = 4/6/8/10s). Prefer durationSeconds (native Flow semantics). Mutually exclusive with durationSeconds. | |
| videoMediaId | No | mediaId of an EXISTING completed video in the Flow project (see flow_status) as the source for extension keys (veo_3_1_extension_lite, 10 credits), V2V edit (abra_edit, 20 credits) or the 0-credit upscaler (veo_3_1_upsampler_1080p) — references the generated video directly, no re-upload. Images/in-progress ids → structured S301. | |
| durationSeconds | No | Legal set {4,6,8,10}s — off-grid values snap to the nearest with a warning (5→4s, 12→10s). Mutually exclusive with numFrames. |