typetext
{
"aspect_ratio": "16:9",
"cfg_scale": 0.5,
"duration": 5,
"negative_prompt": "",
"prompt": "a woman looks around",
"start_image": "https://replicate.delivery/pbxt/N1hfD2a5qLxybqR81gbn1z71f91YM08tyqR9IcLo1yzVQDbf/tq042p1dhdrm80cnrj6bkgpnx8.png"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_7bT**********************************
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 kwaivgi/kling-v1.5-standard using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "16:9",
cfg_scale: 0.5,
duration: 5,
negative_prompt: "",
prompt: "a woman looks around",
start_image: "https://replicate.delivery/pbxt/N1hfD2a5qLxybqR81gbn1z71f91YM08tyqR9IcLo1yzVQDbf/tq042p1dhdrm80cnrj6bkgpnx8.png"
};
const output = await replicate.run("kwaivgi/kling-v1.5-standard", { 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_7bT**********************************
This is your API token. Keep it to yourself.
import replicate
Run kwaivgi/kling-v1.5-standard using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"kwaivgi/kling-v1.5-standard",
input={
"aspect_ratio": "16:9",
"cfg_scale": 0.5,
"duration": 5,
"negative_prompt": "",
"prompt": "a woman looks around",
"start_image": "https://replicate.delivery/pbxt/N1hfD2a5qLxybqR81gbn1z71f91YM08tyqR9IcLo1yzVQDbf/tq042p1dhdrm80cnrj6bkgpnx8.png"
}
)
# 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_7bT**********************************
This is your API token. Keep it to yourself.
Run kwaivgi/kling-v1.5-standard 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",
"cfg_scale": 0.5,
"duration": 5,
"negative_prompt": "",
"prompt": "a woman looks around",
"start_image": "https://replicate.delivery/pbxt/N1hfD2a5qLxybqR81gbn1z71f91YM08tyqR9IcLo1yzVQDbf/tq042p1dhdrm80cnrj6bkgpnx8.png"
}
}' \
https://api.replicate.com/v1/models/kwaivgi/kling-v1.5-standard/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "qnag8pq27hrma0cpw0ptt09qt0",
"model": "kwaivgi/kling-v1.5-standard",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"cfg_scale": 0.5,
"duration": 5,
"negative_prompt": "",
"prompt": "a woman looks around",
"start_image": "https://replicate.delivery/pbxt/N1hfD2a5qLxybqR81gbn1z71f91YM08tyqR9IcLo1yzVQDbf/tq042p1dhdrm80cnrj6bkgpnx8.png"
},
"logs": "Moderating content...\nModerating content...\nModeration complete in 0.31sec\nModeration complete in 0.53sec\nUsing model: kling-v1-5 in std mode\nGenerating video...\nGenerated video in 181.7sec\nDownloading 3937503 bytes\nDownloaded 3.76MB in 1.41sec",
"output": "https://replicate.delivery/xezq/geoGx04RhcWVWyTXfNoM9YgKVNecaZLlJ6Mp3MBwMA5zhWbpA/tmph_0er4mw.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2025-05-17T21:37:05.596Z",
"started_at": "2025-05-17T21:37:05.605457Z",
"completed_at": "2025-05-17T21:40:09.408995Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/qnag8pq27hrma0cpw0ptt09qt0/cancel",
"get": "https://api.replicate.com/v1/predictions/qnag8pq27hrma0cpw0ptt09qt0",
"stream": "https://stream.replicate.com/v1/files/bcwr-ds22sudvepbuu3bgqvk3j5w2keiy5f6wct75prc57gygeonbxegq",
"web": "https://replicate.com/p/qnag8pq27hrma0cpw0ptt09qt0"
},
"metrics": {
"predict_time": 183.803538353,
"total_time": 183.812995
}
}