typetext
{
"length": 5,
"prompt": "Dynamic shot racing alongside a steam locomotive on mountain tracks, camera panning from wheels to steam billowing against snow-capped peaks. Epic scale, dramatic lighting, photorealistic detail."
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_UXE**********************************
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 wavespeedai/hunyuan-video-fast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
length: 5,
prompt: "Dynamic shot racing alongside a steam locomotive on mountain tracks, camera panning from wheels to steam billowing against snow-capped peaks. Epic scale, dramatic lighting, photorealistic detail."
};
const output = await replicate.run("wavespeedai/hunyuan-video-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_UXE**********************************
This is your API token. Keep it to yourself.
import replicate
Run wavespeedai/hunyuan-video-fast using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"wavespeedai/hunyuan-video-fast",
input={
"length": 5,
"prompt": "Dynamic shot racing alongside a steam locomotive on mountain tracks, camera panning from wheels to steam billowing against snow-capped peaks. Epic scale, dramatic lighting, photorealistic detail."
}
)
# 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_UXE**********************************
This is your API token. Keep it to yourself.
Run wavespeedai/hunyuan-video-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": {
"length": 5,
"prompt": "Dynamic shot racing alongside a steam locomotive on mountain tracks, camera panning from wheels to steam billowing against snow-capped peaks. Epic scale, dramatic lighting, photorealistic detail."
}
}' \
https://api.replicate.com/v1/models/wavespeedai/hunyuan-video-fast/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "w46z7vd53srmc0cn55f90t3bnm",
"model": "wavespeedai/hunyuan-video-fast",
"version": "hidden",
"input": {
"length": 5,
"prompt": "Dynamic shot racing alongside a steam locomotive on mountain tracks, camera panning from wheels to steam billowing against snow-capped peaks. Epic scale, dramatic lighting, photorealistic detail."
},
"logs": "Using seed: 1546984189\n\nModerating content...\nModeration complete in 0.27sec\nRunning prediction... \n\nGenerating video...\n\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nStill generating...\nGenerated video in 67.4sec",
"output": "https://replicate.delivery/xezq/jZzrel7JNlzGaSk9TNQTgBlWl4yzeMH503fMzupHddAmvLjoA/output.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-02-21T16:37:03.39Z",
"started_at": "2025-02-21T16:37:03.407116Z",
"completed_at": "2025-02-21T16:38:11.661773Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/w46z7vd53srmc0cn55f90t3bnm/cancel",
"get": "https://api.replicate.com/v1/predictions/w46z7vd53srmc0cn55f90t3bnm",
"stream": "https://stream.replicate.com/v1/files/bcwr-bqnf2lgwmavznlskfbebbbzka2kck7ahchmoawe2o7yc5wzw3gta",
"web": "https://replicate.com/p/w46z7vd53srmc0cn55f90t3bnm"
},
"metrics": {
"predict_time": 68.25465667,
"total_time": 68.271773
}
}