typetext
{
"aspect_ratio": "16:9",
"duration": 8,
"generate_audio": true,
"image": "https://replicate.delivery/pbxt/NtA24zy4mLgKWNrWNeA0oo7vYtfBrlqekDg9YzvYME7DWviD/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"last_frame": "https://replicate.delivery/pbxt/NtA25IqhAytam2wvnJB1aEteldVkJfDfUNBbQVb6pvRpGNIJ/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"prompt": "The camera zooms right into her eye, focuses, then zooms all the way back again (no cross fade)",
"resolution": "720p"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2gC**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run google/veo-3.1-fast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "16:9",
duration: 8,
generate_audio: true,
image: "https://replicate.delivery/pbxt/NtA24zy4mLgKWNrWNeA0oo7vYtfBrlqekDg9YzvYME7DWviD/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
last_frame: "https://replicate.delivery/pbxt/NtA25IqhAytam2wvnJB1aEteldVkJfDfUNBbQVb6pvRpGNIJ/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
prompt: "The camera zooms right into her eye, focuses, then zooms all the way back again (no cross fade)",
resolution: "720p"
};
const output = await replicate.run("google/veo-3.1-fast", { input });
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2gC**********************************
This is your API token. Keep it to yourself.
import replicate
Run google/veo-3.1-fast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"google/veo-3.1-fast",
input={
"aspect_ratio": "16:9",
"duration": 8,
"generate_audio": True,
"image": "https://replicate.delivery/pbxt/NtA24zy4mLgKWNrWNeA0oo7vYtfBrlqekDg9YzvYME7DWviD/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"last_frame": "https://replicate.delivery/pbxt/NtA25IqhAytam2wvnJB1aEteldVkJfDfUNBbQVb6pvRpGNIJ/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"prompt": "The camera zooms right into her eye, focuses, then zooms all the way back again (no cross fade)",
"resolution": "720p"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2gC**********************************
This is your API token. Keep it to yourself.
Run google/veo-3.1-fast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"input": {
"aspect_ratio": "16:9",
"duration": 8,
"generate_audio": true,
"image": "https://replicate.delivery/pbxt/NtA24zy4mLgKWNrWNeA0oo7vYtfBrlqekDg9YzvYME7DWviD/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"last_frame": "https://replicate.delivery/pbxt/NtA25IqhAytam2wvnJB1aEteldVkJfDfUNBbQVb6pvRpGNIJ/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"prompt": "The camera zooms right into her eye, focuses, then zooms all the way back again (no cross fade)",
"resolution": "720p"
}
}' \
https://api.replicate.com/v1/models/google/veo-3.1-fast/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "btfhsk0brdrme0cswz1svpa1t0",
"model": "google/veo-3.1-fast",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"duration": 8,
"generate_audio": true,
"image": "https://replicate.delivery/pbxt/NtA24zy4mLgKWNrWNeA0oo7vYtfBrlqekDg9YzvYME7DWviD/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"last_frame": "https://replicate.delivery/pbxt/NtA25IqhAytam2wvnJB1aEteldVkJfDfUNBbQVb6pvRpGNIJ/replicate-prediction-jthe403h69rm80cswygbz19zv4.jpeg",
"prompt": "The camera zooms right into her eye, focuses, then zooms all the way back again (no cross fade)",
"resolution": "720p"
},
"logs": "Using seed: 1941777570\nStarting video generation...\nStill generating...\nGenerated video in 42.99 seconds\nDownloading video...\nDownloaded video in 0.62 seconds",
"output": "https://replicate.delivery/xezq/aOYeXeCcnHhDiELUfr7GJR0IkfcGabYRUWiTShhvdJCTEQ9VB/tmpafbwmta5.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-15T12:05:43.491Z",
"started_at": "2025-10-15T12:05:43.637191Z",
"completed_at": "2025-10-15T12:06:28.560647Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/btfhsk0brdrme0cswz1svpa1t0/cancel",
"get": "https://api.replicate.com/v1/predictions/btfhsk0brdrme0cswz1svpa1t0",
"stream": "https://stream.replicate.com/v1/files/bcwr-a4mfuvavbixczv6yzatjn6owalyjxwwtrtspfd2buo7lpykbksia",
"web": "https://replicate.com/p/btfhsk0brdrme0cswz1svpa1t0"
},
"metrics": {
"predict_time": 44.923455734,
"total_time": 45.069647
}
}
