typetext
{
"aspect_ratio": "16:9",
"duration": 8,
"generate_audio": true,
"prompt": "the woman is giving an interview for a podcast, wearing a pink top with the logo, it also neatly says \"Veo 3.1\", she is in a midcentury modern studio with pink lighting, she talks about using Veo 3.1 with reference images to put things into videos you're making, the logo is also in a framed picture against black behind her",
"reference_images": [
"https://replicate.delivery/pbxt/Nt8bL90QO5In3RDkC82HtqeXqNdITglTVpaicTgrdT8mtjiW/0_1.webp",
"https://replicate.delivery/pbxt/Nt8bLbk1uz4EIMWhIQ0DyjO8BGJYYeAgQWgEnFUWNMOGEpbU/Screenshot%202025-08-26%20at%205.30.12%E2%80%AFPM.png"
],
"resolution": "1080p"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_AFO**********************************
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 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,
prompt: "the woman is giving an interview for a podcast, wearing a pink top with the logo, it also neatly says \"Veo 3.1\", she is in a midcentury modern studio with pink lighting, she talks about using Veo 3.1 with reference images to put things into videos you're making, the logo is also in a framed picture against black behind her",
reference_images: ["https://replicate.delivery/pbxt/Nt8bL90QO5In3RDkC82HtqeXqNdITglTVpaicTgrdT8mtjiW/0_1.webp","https://replicate.delivery/pbxt/Nt8bLbk1uz4EIMWhIQ0DyjO8BGJYYeAgQWgEnFUWNMOGEpbU/Screenshot%202025-08-26%20at%205.30.12%E2%80%AFPM.png"],
resolution: "1080p"
};
const output = await replicate.run("google/veo-3.1", { 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_AFO**********************************
This is your API token. Keep it to yourself.
import replicate
Run google/veo-3.1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"google/veo-3.1",
input={
"aspect_ratio": "16:9",
"duration": 8,
"generate_audio": True,
"prompt": "the woman is giving an interview for a podcast, wearing a pink top with the logo, it also neatly says \"Veo 3.1\", she is in a midcentury modern studio with pink lighting, she talks about using Veo 3.1 with reference images to put things into videos you're making, the logo is also in a framed picture against black behind her",
"reference_images": ["https://replicate.delivery/pbxt/Nt8bL90QO5In3RDkC82HtqeXqNdITglTVpaicTgrdT8mtjiW/0_1.webp","https://replicate.delivery/pbxt/Nt8bLbk1uz4EIMWhIQ0DyjO8BGJYYeAgQWgEnFUWNMOGEpbU/Screenshot%202025-08-26%20at%205.30.12%E2%80%AFPM.png"],
"resolution": "1080p"
}
)
# 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_AFO**********************************
This is your API token. Keep it to yourself.
Run google/veo-3.1 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,
"prompt": "the woman is giving an interview for a podcast, wearing a pink top with the logo, it also neatly says \\"Veo 3.1\\", she is in a midcentury modern studio with pink lighting, she talks about using Veo 3.1 with reference images to put things into videos you\'re making, the logo is also in a framed picture against black behind her",
"reference_images": ["https://replicate.delivery/pbxt/Nt8bL90QO5In3RDkC82HtqeXqNdITglTVpaicTgrdT8mtjiW/0_1.webp","https://replicate.delivery/pbxt/Nt8bLbk1uz4EIMWhIQ0DyjO8BGJYYeAgQWgEnFUWNMOGEpbU/Screenshot%202025-08-26%20at%205.30.12%E2%80%AFPM.png"],
"resolution": "1080p"
}
}' \
https://api.replicate.com/v1/models/google/veo-3.1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "zmzn6n2e9xrme0cswxpr4z734g",
"model": "google/veo-3.1",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"duration": 8,
"generate_audio": true,
"prompt": "the woman is giving an interview for a podcast, wearing a pink top with the logo, it also neatly says \"Veo 3.1\", she is in a midcentury modern studio with pink lighting, she talks about using Veo 3.1 with reference images to put things into videos you're making, the logo is also in a framed picture against black behind her",
"reference_images": [
"https://replicate.delivery/pbxt/Nt8bL90QO5In3RDkC82HtqeXqNdITglTVpaicTgrdT8mtjiW/0_1.webp",
"https://replicate.delivery/pbxt/Nt8bLbk1uz4EIMWhIQ0DyjO8BGJYYeAgQWgEnFUWNMOGEpbU/Screenshot%202025-08-26%20at%205.30.12%E2%80%AFPM.png"
],
"resolution": "1080p"
},
"logs": "Using seed: 310333719\nStarting video generation...\nStill generating...\nStill generating...\nGenerated video in 99.76 seconds\nDownloading video...\nDownloaded video in 0.42 seconds",
"output": "https://replicate.delivery/xezq/WoC3evx2EQQHLCHq9vEfjhIq9ZotfQhQWmBEd54iLhvVUleVB/tmpk07h98l4.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-10-15T10:32:04.431Z",
"started_at": "2025-10-15T10:32:04.599228Z",
"completed_at": "2025-10-15T10:33:46.386292Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/zmzn6n2e9xrme0cswxpr4z734g/cancel",
"get": "https://api.replicate.com/v1/predictions/zmzn6n2e9xrme0cswxpr4z734g",
"stream": "https://stream.replicate.com/v1/files/bcwr-dtwll5wxvdhbvvir22ncvcnn6ya53m4wo4or3vlqnpc7qkqpkr4a",
"web": "https://replicate.com/p/zmzn6n2e9xrme0cswxpr4z734g"
},
"metrics": {
"predict_time": 101.787063821,
"total_time": 101.955292
}
}
