typetext
{
"aspect_ratio": "16:9",
"duration": 7,
"generate_audio": true,
"prompt": "A cozy cabin in a snowy forest at night, warm light glowing from the windows, gentle snowfall, camera slowly pushing in through the trees",
"resolution": "720p",
"seed": 99
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_e9x**********************************
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 bytedance/seedance-2.0 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "16:9",
duration: 7,
generate_audio: true,
prompt: "A cozy cabin in a snowy forest at night, warm light glowing from the windows, gentle snowfall, camera slowly pushing in through the trees",
resolution: "720p",
seed: 99
};
const output = await replicate.run("bytedance/seedance-2.0", { 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_e9x**********************************
This is your API token. Keep it to yourself.
import replicate
Run bytedance/seedance-2.0 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"bytedance/seedance-2.0",
input={
"aspect_ratio": "16:9",
"duration": 7,
"generate_audio": True,
"prompt": "A cozy cabin in a snowy forest at night, warm light glowing from the windows, gentle snowfall, camera slowly pushing in through the trees",
"resolution": "720p",
"seed": 99
}
)
# 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_e9x**********************************
This is your API token. Keep it to yourself.
Run bytedance/seedance-2.0 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": 7,
"generate_audio": true,
"prompt": "A cozy cabin in a snowy forest at night, warm light glowing from the windows, gentle snowfall, camera slowly pushing in through the trees",
"resolution": "720p",
"seed": 99
}
}' \
https://api.replicate.com/v1/models/bytedance/seedance-2.0/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "cvmsf12b4drmr0cxdt08pxwybm",
"model": "bytedance/seedance-2.0",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"duration": 7,
"generate_audio": true,
"prompt": "A cozy cabin in a snowy forest at night, warm light glowing from the windows, gentle snowfall, camera slowly pushing in through the trees",
"resolution": "720p",
"seed": 99
},
"logs": "Using seed: 99\nGenerating video...\nGenerated video in 111.7sec\nDownloading 2682088 bytes\nDownloaded 2.56MB in 2.74sec",
"output": "https://replicate.delivery/xezq/3Uc0eKT36R2dIiXkrse8tD822Mhne8AIAMV6ekMcDg8WnWkZB/tmp7_ephsht.mp4",
"data_removed": false,
"error": null,
"source": "api",
"status": "succeeded",
"created_at": "2026-04-08T19:09:54.851Z",
"started_at": "2026-04-08T19:09:54.878959Z",
"completed_at": "2026-04-08T19:11:49.852711Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/cvmsf12b4drmr0cxdt08pxwybm/cancel",
"get": "https://api.replicate.com/v1/predictions/cvmsf12b4drmr0cxdt08pxwybm",
"stream": "https://stream.replicate.com/v1/files/jbxs-j37no44vci5wchlkvopmcw5tpfem7aex2lcah6yqmvgmmu7j5hza",
"web": "https://replicate.com/p/cvmsf12b4drmr0cxdt08pxwybm"
},
"metrics": {
"predict_time": 114.973751727,
"total_time": 115.001711667
}
}