typetext
{
"context_hint": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"enable_sound": true,
"enable_upscaling": true,
"frames_per_second": 16,
"go_fast": true,
"image": "https://replicate.delivery/pbxt/NSLw0NNrgAIk7nQgeyzUKQPmS2riB2gvC0xPFnSvF5mjHOHp/image.png",
"num_frames": 81,
"prompt": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"quality": "fast",
"resolution": "16:9",
"sample_shift": 12,
"sample_steps": 30,
"target_fps": 60,
"target_resolution": "4k"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_XPO**********************************
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 zsxkib/wan-2.2-with-sound using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
context_hint: "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
enable_sound: true,
enable_upscaling: true,
frames_per_second: 16,
go_fast: true,
image: "https://replicate.delivery/pbxt/NSLw0NNrgAIk7nQgeyzUKQPmS2riB2gvC0xPFnSvF5mjHOHp/image.png",
num_frames: 81,
prompt: "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
quality: "fast",
resolution: "16:9",
sample_shift: 12,
sample_steps: 30,
target_fps: 60,
target_resolution: "4k"
};
const output = await replicate.run("zsxkib/wan-2.2-with-sound", { 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_XPO**********************************
This is your API token. Keep it to yourself.
import replicate
Run zsxkib/wan-2.2-with-sound using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"zsxkib/wan-2.2-with-sound",
input={
"context_hint": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"enable_sound": True,
"enable_upscaling": True,
"frames_per_second": 16,
"go_fast": True,
"image": "https://replicate.delivery/pbxt/NSLw0NNrgAIk7nQgeyzUKQPmS2riB2gvC0xPFnSvF5mjHOHp/image.png",
"num_frames": 81,
"prompt": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"quality": "fast",
"resolution": "16:9",
"sample_shift": 12,
"sample_steps": 30,
"target_fps": 60,
"target_resolution": "4k"
}
)
# 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_XPO**********************************
This is your API token. Keep it to yourself.
Run zsxkib/wan-2.2-with-sound 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": {
"context_hint": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"enable_sound": true,
"enable_upscaling": true,
"frames_per_second": 16,
"go_fast": true,
"image": "https://replicate.delivery/pbxt/NSLw0NNrgAIk7nQgeyzUKQPmS2riB2gvC0xPFnSvF5mjHOHp/image.png",
"num_frames": 81,
"prompt": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"quality": "fast",
"resolution": "16:9",
"sample_shift": 12,
"sample_steps": 30,
"target_fps": 60,
"target_resolution": "4k"
}
}' \
https://api.replicate.com/v1/models/zsxkib/wan-2.2-with-sound/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "z3c1jmryksrma0crcb9bqnna1m",
"model": "zsxkib/wan-2.2-with-sound",
"version": "hidden",
"input": {
"context_hint": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"enable_sound": true,
"enable_upscaling": true,
"frames_per_second": 16,
"go_fast": true,
"image": "https://replicate.delivery/pbxt/NSLw0NNrgAIk7nQgeyzUKQPmS2riB2gvC0xPFnSvF5mjHOHp/image.png",
"num_frames": 81,
"prompt": "British short-haired cat giving an evil laugh while putting on his top hat and monocle",
"quality": "fast",
"resolution": "16:9",
"sample_shift": 12,
"sample_steps": 30,
"target_fps": 60,
"target_resolution": "4k"
},
"logs": "🎬 Perfect match: fast quality I2V\n📊 Mode: Image-to-Video\n⚡ ⚡ Fast Image-to-Video: PrunaAI optimized, perfect for rapid iteration\n🎥 Generating video...\n 🔧 Model: wan-video/wan-2.2-i2v-fast\n ✅ Video generation completed\n🔊 Adding AI-generated sound...\n ✅ Sound generation completed\n⬆️ Upscaling video to 4k at 60fps...\n ✅ Video upscaling completed\n✅ Pipeline complete!",
"output": "https://replicate.delivery/xezq/bIA7nTHWIUJ7NFl0dU3QY0fz09eBRAladfpCKR56wu0a71MqA/tmp3iwlibn_.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-07-31T23:29:54.334Z",
"started_at": "2025-07-31T23:29:59.326069Z",
"completed_at": "2025-07-31T23:34:05.505976Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/z3c1jmryksrma0crcb9bqnna1m/cancel",
"children": "https://api.replicate.com/v1/predictions/z3c1jmryksrma0crcb9bqnna1m/children",
"get": "https://api.replicate.com/v1/predictions/z3c1jmryksrma0crcb9bqnna1m",
"root": "https://api.replicate.com/v1/predictions/z3c1jmryksrma0crcb9bqnna1m",
"stream": "https://stream.replicate.com/v1/files/bcwr-orjr6ieg2opgh3r6dwhyczk3622r3mjs7ugmfafalsgwylfdci2a",
"web": "https://replicate.com/p/z3c1jmryksrma0crcb9bqnna1m"
},
"metrics": {
"predict_time": 246.179907626,
"total_time": 251.171976
}
}