Batch-generate Veo 3.1 video through the Google Flow API by useapi.net.
📖 Full walkthrough: Generate AI video with Veo 3.1 via curl and the Google Flow API
google-flow.mjs (Node.js) and google-flow.py (Python) are equivalent implementations — each reads prompts from prompts.json, uploads any start/end-frame images, submits each job to POST /videos in async mode, polls GET /jobs/{jobId}, and downloads every finished MP4.
- Node.js v21 or newer (no dependencies to install — uses built-in
fetch), or Python 3.x (standard library only — no dependencies to install) - A useapi.net API token
- A connected Google Flow account email
node ./google-flow.mjs <API_TOKEN> <EMAIL> [PROMPTS_FILE]
python3 ./google-flow.py <API_TOKEN> <EMAIL> [PROMPTS_FILE]PROMPTS_FILE defaults to prompts.json. The script looks the account up by email and checks its health field before submitting.
prompts.json is an array of prompt objects — prompt is the only required field; everything else falls back to the API defaults (model veo-3.1-fast, landscape, 8 seconds). Supported models include veo-3.1-fast, veo-3.1-quality, veo-3.1-lite, veo-3.1-lite-low-priority, and omni-flash.
- Image-to-video: set
startImage(and optionallyendImage) to a local file path — the script uploads it for you. - Reference-to-video: use
referenceImage_1…referenceImage_3.
Every parameter is documented on POST /videos. Local image paths in prompts.json (e.g. ./first_image.jpeg) are inputs you supply — they are not included in this repo.