typetext
{
"aspect_ratio": "16:9",
"duration": 15,
"generate_audio": true,
"prompt": "按 Image 1 的故事版生成视频",
"reference_audios": [],
"reference_images": [
"https://replicate.delivery/pbxt/P0gcM2jonEv6KS1aMlSNwt1s0BkgTB4tvHOpwveo2iC6b1XB/HHAglbTXAAAR3bD.jpeg"
],
"reference_videos": [],
"resolution": "480p",
"seed": 99
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_DFJ**********************************
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: 15,
generate_audio: true,
prompt: "按 Image 1 的故事版生成视频",
reference_audios: [],
reference_images: ["https://replicate.delivery/pbxt/P0gcM2jonEv6KS1aMlSNwt1s0BkgTB4tvHOpwveo2iC6b1XB/HHAglbTXAAAR3bD.jpeg"],
reference_videos: [],
resolution: "480p",
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_DFJ**********************************
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": 15,
"generate_audio": True,
"prompt": "按 Image 1 的故事版生成视频",
"reference_audios": [],
"reference_images": ["https://replicate.delivery/pbxt/P0gcM2jonEv6KS1aMlSNwt1s0BkgTB4tvHOpwveo2iC6b1XB/HHAglbTXAAAR3bD.jpeg"],
"reference_videos": [],
"resolution": "480p",
"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_DFJ**********************************
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": 15,
"generate_audio": true,
"prompt": "按 Image 1 的故事版生成视频",
"reference_audios": [],
"reference_images": ["https://replicate.delivery/pbxt/P0gcM2jonEv6KS1aMlSNwt1s0BkgTB4tvHOpwveo2iC6b1XB/HHAglbTXAAAR3bD.jpeg"],
"reference_videos": [],
"resolution": "480p",
"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": "jza4d1rvm5rmw0cxv1vrtv5jjr",
"model": "bytedance/seedance-2.0",
"version": "hidden",
"input": {
"aspect_ratio": "16:9",
"duration": 15,
"generate_audio": true,
"prompt": "按 Image 1 的故事版生成视频",
"reference_audios": [],
"reference_images": [
"https://replicate.delivery/pbxt/P0gcM2jonEv6KS1aMlSNwt1s0BkgTB4tvHOpwveo2iC6b1XB/HHAglbTXAAAR3bD.jpeg"
],
"reference_videos": [],
"resolution": "480p",
"seed": 99
},
"logs": "Using seed: 99\nGenerating video... (request ID: cgt-20260429165939-tvfkw)\nGenerated video in 173.1sec\nDownloading 3120013 bytes\nDownloaded 2.98MB in 2.92sec",
"output": "https://replicate.delivery/xezq/uUQOn8kxAg4gARioKTbbqAinkcEifEyR7xvxT0ZKDkJV27PLA/tmp4_ilplw8.mp4",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2026-04-29T08:59:37.761Z",
"started_at": "2026-04-29T08:59:37.773242Z",
"completed_at": "2026-04-29T09:02:34.718778Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/jza4d1rvm5rmw0cxv1vrtv5jjr/cancel",
"get": "https://api.replicate.com/v1/predictions/jza4d1rvm5rmw0cxv1vrtv5jjr",
"stream": "https://stream.replicate.com/v1/files/jbxs-bxgf7ayq3piscqkhawcbsxqy65voffysitfylo727y5uf7nqdqoq",
"web": "https://replicate.com/p/jza4d1rvm5rmw0cxv1vrtv5jjr"
},
"metrics": {
"model_variant": "non_video_in",
"predict_time": 176.945535611,
"resolution_target": "480p",
"token_output_count": 151078,
"total_time": 176.957778247,
"video_output_duration_seconds": 15
}
}