Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Veo 3.1 video — Google Flow API batch generation (Node.js & Python)

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.

Prerequisites

  • 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

Usage

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

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 optionally endImage) to a local file path — the script uploads it for you.
  • Reference-to-video: use referenceImage_1referenceImage_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.


Support: Discord · Telegram · YouTube