typetext
{
"prompt": "a woman laughs"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_45G**********************************
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 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
prompt: "a woman laughs"
};
const output = await replicate.run("google/veo-3", { 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_45G**********************************
This is your API token. Keep it to yourself.
import replicate
Run google/veo-3 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"google/veo-3",
input={
"prompt": "a woman laughs"
}
)
# 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_45G**********************************
This is your API token. Keep it to yourself.
Run google/veo-3 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": {
"prompt": "a woman laughs"
}
}' \
https://api.replicate.com/v1/models/google/veo-3/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "z4zf8gmea9rma0cq8tjrddzk34",
"model": "google/veo-3",
"version": "hidden",
"input": {
"prompt": "a woman laughs"
},
"logs": "Using seed: 777233049\nStarting video generation...\nStill generating...\nStill generating...\nStill generating...\nGenerated video in 135.73 seconds\nDownloading video...\nDownloaded video in 0.14 seconds",
"output": "https://replicate.delivery/xezq/shxi5kIyj54IJVYnATFloCy5MLwBUo9J63lAGUt55ubWvDNF/tmpt6scq_mg.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-06-06T19:09:04.466Z",
"started_at": "2025-06-06T19:09:04.490061Z",
"completed_at": "2025-06-06T19:11:21.247578Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/z4zf8gmea9rma0cq8tjrddzk34/cancel",
"get": "https://api.replicate.com/v1/predictions/z4zf8gmea9rma0cq8tjrddzk34",
"stream": "https://stream.replicate.com/v1/files/bcwr-tdg3udbghxrsdmcgoswqumbmvfow7b7ce3tzsm6ldvflztjuoewq",
"web": "https://replicate.com/p/z4zf8gmea9rma0cq8tjrddzk34"
},
"metrics": {
"predict_time": 136.757516512,
"total_time": 136.781578
}
}