typetext
{
"aspect_ratio": "16:9",
"duration": 5,
"effect": "None",
"motion_mode": "normal",
"negative_prompt": "",
"prompt": "a snow leopard is walking carefully, snowy landscape scene at twilight",
"quality": "1080p",
"style": "None"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_DYG**********************************
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 pixverse/pixverse-v4.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "16:9",
duration: 5,
effect: "None",
motion_mode: "normal",
negative_prompt: "",
prompt: "a snow leopard is walking carefully, snowy landscape scene at twilight",
quality: "1080p",
style: "None"
};
const output = await replicate.run("pixverse/pixverse-v4.5", { 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_DYG**********************************
This is your API token. Keep it to yourself.
import replicate
Run pixverse/pixverse-v4.5 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"pixverse/pixverse-v4.5",
input={
"aspect_ratio": "16:9",
"duration": 5,
"effect": "None",
"motion_mode": "normal",
"negative_prompt": "",
"prompt": "a snow leopard is walking carefully, snowy landscape scene at twilight",
"quality": "1080p",
"style": "None"
}
)
# 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_DYG**********************************
This is your API token. Keep it to yourself.
Run pixverse/pixverse-v4.5 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": 5,
"effect": "None",
"motion_mode": "normal",
"negative_prompt": "",
"prompt": "a snow leopard is walking carefully, snowy landscape scene at twilight",
"quality": "1080p",
"style": "None"
}
}' \
https://api.replicate.com/v1/models/pixverse/pixverse-v4.5/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "8p6yaxs6tsrme0cpv2ctmypbjc",
"model": "pixverse/pixverse-v4.5",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"duration": 5,
"effect": "None",
"motion_mode": "normal",
"negative_prompt": "",
"prompt": "a snow leopard is walking carefully, snowy landscape scene at twilight",
"quality": "1080p",
"style": "None"
},
"logs": "Using seed: 1605356899\nModerating content...\nModeration complete in 0.20sec\nGenerating video...\nGenerated video in 63.9sec\nDownloading 3516960 bytes\nDownloaded 3.35MB in 0.78sec\nUnit calculation:\n Base units for 1080p: 120\n---------------------------\nTotal units: 120\n---------------------------",
"output": "https://replicate.delivery/xezq/nCLgz2veEJzhJqhMOQuIM6K2Of5Ryy1NPBB0kmp03R1uLMtUA/tmpcxcacfc2.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-05-16T10:17:17.782Z",
"started_at": "2025-05-16T10:17:17.788911Z",
"completed_at": "2025-05-16T10:18:22.676037Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/8p6yaxs6tsrme0cpv2ctmypbjc/cancel",
"get": "https://api.replicate.com/v1/predictions/8p6yaxs6tsrme0cpv2ctmypbjc",
"stream": "https://stream.replicate.com/v1/files/bcwr-akbsp644wn55kkrqhvbjkdknnnixxumpecgitjl2uui5mowtefdq",
"web": "https://replicate.com/p/8p6yaxs6tsrme0cpv2ctmypbjc"
},
"metrics": {
"predict_time": 64.8871264,
"total_time": 64.894037
}
}