Batch-generate high-fidelity images with Runway Frames — including up to three reference images — through the Runway API by useapi.net.
📖 Full walkthrough: How to Batch-Generate Images with Runway Frames via API
frames.mjs reads prompts from prompts.json, submits each job to POST /frames/create (up to three generations run in parallel), polls GET /tasks/{taskId} until each task is final, and downloads every finished image (1 or 4 per generation, default 4).
- Node.js v21 or newer (no dependencies to install — uses built-in
fetch) - A useapi.net API token
- A connected Runway account email
node ./frames.mjs <API_TOKEN> <EMAIL> prompts.jsonThe script looks the account up by email before submitting. Note: frames.mjs defaults to frames.json when no prompts file is given, so pass prompts.json explicitly (as above) to use the file in this folder.
prompts.json is an array of prompt objects — text_prompt is the only required field. By default exploreMode is ON and num_images is 4. Optional fields include style, aspect_ratio, diversity, seed, and num_images (1 or 4). For reference images, upload them first with POST /assets, then pass their asset ids as imageAssetId1, imageAssetId2, imageAssetId3 and refer to them in the prompt as @IMG_1, @IMG_2, @IMG_3. Every supported parameter is documented on POST /frames/create.