Seedance 2.0
Seedance 2.0 模型通过一个统一的异步任务 API 调用。用 POST /api/generate 发起任务,再轮询 GET /api/generate/{taskId} 直到完成。本系列提供 3 个端点。
概览
每个端点共享相同的外层结构 —— 只有 model 和 input 字段不同。可在模型市场的 playground 中运行任意一个。
bytedance/seedance-2、-fast、-mini 共用同一套 input 字段,通过不同字段组合选择模式(互斥):
- 文生视频:仅 prompt(可选 reference_*)
- 单图生视频:
first_frame_url+ prompt,aspect_ratio必须adaptive - 首尾帧:
first_frame_url+last_frame_url+ prompt,同样必须adaptive;不要填reference_* - Omni Reference:
reference_image_urls+ 可选视频/音频;prompt 用@image1、@video1、@audio1
直连路由:人像标 virtual(real 等效)进虚拟人像库;场景/背景/产品默认 skip 直链。成功时 resultUrls 返回 /api/media/{taskId}/0.mp4 代理链接,国内可直接播放。
reference_image_urls 旁用 reference_portrait_kinds 逐张标记:virtual(人像入库,含真人/AI;real 等效)、skip(背景/场景,不入库;未标记时默认 skip)。 单图/首尾帧用 first_frame_portrait_kind / last_frame_portrait_kind,语义相同。Seedance 2 参考媒体限制
参考图片
- 支持格式
- JPEG, PNG, WEBP, BMP, TIFF, GIF
- 宽度 / 高度
- 300-6000 px
- 宽高比
- 0.4-2.5
- 单个文件
- < 30 MB
参考视频
- 支持格式
- MP4, MOV
- 分辨率档位
- 480p, 720p
- 单个时长
- 2-15 s
- 数量 / 总时长
- 最多 3 个 / 总时长不超过 15 秒
- 宽度 / 高度
- 300-6000 px
- 总像素
- 409600-927408
- 宽高比
- 0.4-2.5
- 单个文件
- <= 50 MB
- 帧率
- 24-60 FPS
参考音频
- 支持格式
- WAV, MP3
- 单个时长
- 2-15 s
- 数量 / 总时长
- 最多 3 个 / 总时长不超过 15 秒
- 单个文件
- <= 15 MB
- 采样率 / 声道
- 尚未公开
- 音频编码 Codec
- 尚未公开
输出视频
- resolution
- 480p, 720p, 1080p, 4k
- aspect_ratio
- 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive
- 精确像素尺寸
- 尚未公开,不保证固定为某一组宽高
认证
在 /api-keys 创建 API 密钥,然后作为 Bearer token 发送。已登录时从浏览器发起的请求也可通过会话 cookie 生效。
Authorization: Bearer <YOUR_API_KEY>创建任务
POST https://api.lithovas.com/api/generate请求体:{ "model": "<slug>", "input": { … } }
响应:{ "taskId": "<id>", "state": "waiting" }
查询结果
GET https://api.lithovas.com/api/generate/<taskId>响应:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }
{
"state": "success",
"resultUrls": [
"https://www.lithovas.com/api/media/task_97ai_example/0.mp4"
],
"creditsConsumed": 161,
"balance": 9958,
"_comment": "resultUrls 为 97AI 第一方代理链接,国内可直接播放;服务端会按需刷新上游签名后再回源。"
}state 变为 success 或 fail。失败任务不计费。端点
| 模型 | 任务 | model slug |
|---|---|---|
| Seedance 2 | Image to Video | bytedance/seedance-2 |
| Seedance 2 Fast | Image to Video | bytedance/seedance-2-fast |
| Seedance 2 Mini | Image to Video | bytedance/seedance-2-mini |
Seedance 2 · Image to Video
bytedance/seedance-2promptstring必填Text prompt (max 30000 characters). Use @image1, @video1, @audio1 when reference_* fields are set.
first_frame_urlstring可选First-frame image URL or asset://{assetId}. Mutually exclusive with reference_* fields.
last_frame_urlstring可选Last-frame image URL or asset://{assetId}. Requires first_frame_url.
first_frame_portrait_kindenum<string>可选Portrait-library route: ingest hint for first_frame_url. Default skip (direct URL). Use virtual/real to upload portraits to the asset library.
last_frame_portrait_kindenum<string>可选Portrait-library route: ingest hint for last_frame_url. Default skip (direct URL). Use virtual/real to upload portraits to the asset library.
reference_image_urlsarray<string>可选Reference image URLs (max 9). Mutually exclusive with strict first/last frame mode.
reference_portrait_kindsarray<string>可选Per-image ingest hint aligned with reference_image_urls: virtual (portrait library), real (alias), skip (direct URL; default when omitted).
reference_imagesarray<object>可选Structured reference images: [{ url, portrait: "virtual"|"real"|"skip" }]. Alternative to reference_image_urls + reference_portrait_kinds.
virtual_portraitsarray<string>可选Portrait URLs always uploaded to the virtual portrait library before generation.
real_portraitsarray<string>可选Portrait URLs (including real-person photos) uploaded to the virtual portrait library before generation.
reference_video_urlsarray<string>可选Reference video URLs (max 3). Never uploaded to the asset library.
reference_audio_urlsarray<string>可选Reference audio URLs (max 3). Never uploaded to the asset library.
generate_audioboolean可选Generate synchronized audio with the video.
return_last_frameboolean可选Return the generated video's last frame.
resolutionenum<string>可选Output video resolution (480p–4K).
aspect_ratioenum<string>可选Output aspect ratio. Use adaptive for single-frame or first/last-frame I2V.
durationinteger可选Video duration from 4 to 15 seconds.
output_formatenum<string>可选Video output format.
web_searchboolean可选Enable online search for the generation.
nsfw_checkerboolean可选Enable content safety checking (97AI relay; not forwarded to upstream output moderation).
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2",
"input": {
"duration": 5,
"generate_audio": true,
"output_format": "mp4",
"resolution": "720p",
"return_last_frame": false,
"web_search": false,
"nsfw_checker": false,
"prompt": "镜头缓慢推近,电影感自然光,人物回头微笑",
"aspect_ratio": "16:9"
}
}'Seedance 2 Fast · Image to Video
bytedance/seedance-2-fastpromptstring必填Text prompt (max 30000 characters). Use @image1, @video1, @audio1 when reference_* fields are set.
first_frame_urlstring可选First-frame image URL or asset://{assetId}. Mutually exclusive with reference_* fields.
last_frame_urlstring可选Last-frame image URL or asset://{assetId}. Requires first_frame_url.
first_frame_portrait_kindenum<string>可选Portrait-library route: ingest hint for first_frame_url. Default skip (direct URL). Use virtual/real to upload portraits to the asset library.
last_frame_portrait_kindenum<string>可选Portrait-library route: ingest hint for last_frame_url. Default skip (direct URL). Use virtual/real to upload portraits to the asset library.
reference_image_urlsarray<string>可选Reference image URLs (max 9). Mutually exclusive with strict first/last frame mode.
reference_portrait_kindsarray<string>可选Per-image ingest hint aligned with reference_image_urls: virtual (portrait library), real (alias), skip (direct URL; default when omitted).
reference_imagesarray<object>可选Structured reference images: [{ url, portrait: "virtual"|"real"|"skip" }]. Alternative to reference_image_urls + reference_portrait_kinds.
virtual_portraitsarray<string>可选Portrait URLs always uploaded to the virtual portrait library before generation.
real_portraitsarray<string>可选Portrait URLs (including real-person photos) uploaded to the virtual portrait library before generation.
reference_video_urlsarray<string>可选Reference video URLs (max 3). Never uploaded to the asset library.
reference_audio_urlsarray<string>可选Reference audio URLs (max 3). Never uploaded to the asset library.
generate_audioboolean可选Generate synchronized audio with the video.
return_last_frameboolean可选Return the generated video's last frame.
resolutionenum<string>可选Output video resolution (480p or 720p).
aspect_ratioenum<string>可选Output aspect ratio. Use adaptive for single-frame or first/last-frame I2V.
durationinteger可选Video duration from 4 to 15 seconds.
output_formatenum<string>可选Video output format.
web_searchboolean可选Enable online search for the generation.
nsfw_checkerboolean可选Enable content safety checking (97AI relay; not forwarded to upstream output moderation).
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2-fast",
"input": {
"duration": 5,
"generate_audio": true,
"output_format": "mp4",
"resolution": "720p",
"return_last_frame": false,
"web_search": false,
"nsfw_checker": false,
"prompt": "镜头缓慢推近,电影感自然光,人物回头微笑",
"aspect_ratio": "16:9"
}
}'Seedance 2 Mini · Image to Video
bytedance/seedance-2-minipromptstring必填Text prompt (max 30000 characters). Use @image1, @video1, @audio1 when reference_* fields are set.
first_frame_urlstring可选First-frame image URL or asset://{assetId}. Mutually exclusive with reference_* fields.
last_frame_urlstring可选Last-frame image URL or asset://{assetId}. Requires first_frame_url.
first_frame_portrait_kindenum<string>可选Portrait-library route: ingest hint for first_frame_url. Default skip (direct URL). Use virtual/real to upload portraits to the asset library.
last_frame_portrait_kindenum<string>可选Portrait-library route: ingest hint for last_frame_url. Default skip (direct URL). Use virtual/real to upload portraits to the asset library.
reference_image_urlsarray<string>可选Reference image URLs (max 9). Mutually exclusive with strict first/last frame mode.
reference_portrait_kindsarray<string>可选Per-image ingest hint aligned with reference_image_urls: virtual (portrait library), real (alias), skip (direct URL; default when omitted).
reference_imagesarray<object>可选Structured reference images: [{ url, portrait: "virtual"|"real"|"skip" }]. Alternative to reference_image_urls + reference_portrait_kinds.
virtual_portraitsarray<string>可选Portrait URLs always uploaded to the virtual portrait library before generation.
real_portraitsarray<string>可选Portrait URLs (including real-person photos) uploaded to the virtual portrait library before generation.
reference_video_urlsarray<string>可选Reference video URLs (max 3). Never uploaded to the asset library.
reference_audio_urlsarray<string>可选Reference audio URLs (max 3). Never uploaded to the asset library.
generate_audioboolean可选Generate synchronized audio with the video.
return_last_frameboolean可选Return the generated video's last frame.
resolutionenum<string>可选Output video resolution (480p or 720p).
aspect_ratioenum<string>可选Output aspect ratio. Use adaptive for single-frame or first/last-frame I2V.
durationinteger可选Video duration from 4 to 15 seconds.
output_formatenum<string>可选Video output format.
web_searchboolean可选Enable online search for the generation.
nsfw_checkerboolean可选Enable content safety checking (97AI relay; not forwarded to upstream output moderation).
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2-mini",
"input": {
"duration": 5,
"generate_audio": true,
"output_format": "mp4",
"resolution": "720p",
"return_last_frame": false,
"web_search": false,
"nsfw_checker": false,
"prompt": "镜头缓慢推近,电影感自然光,人物回头微笑",
"aspect_ratio": "16:9"
}
}'Seedance 2.0 模式示例
以下示例与线上一致。同一 model slug 按字段组合切换模式;将 model 换成 bytedance/seedance-2-fast 或 -mini 即可测试不同档位。
curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2",
"input": {
"duration": 5,
"generate_audio": true,
"output_format": "mp4",
"resolution": "720p",
"return_last_frame": false,
"web_search": false,
"nsfw_checker": false,
"prompt": "镜头缓慢推近,人物回头微笑,自然光",
"first_frame_url": "https://frw-images.aiaipic.win/users/3514640099037941760/ai_generated/20260818/038f9f68-004f-4017-a09d-74b3da84e569.png",
"first_frame_portrait_kind": "virtual",
"aspect_ratio": "adaptive"
}
}'curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2",
"input": {
"duration": 5,
"generate_audio": true,
"output_format": "mp4",
"resolution": "480p",
"return_last_frame": false,
"web_search": false,
"nsfw_checker": false,
"prompt": "从首帧平滑过渡到尾帧,电影感运镜",
"first_frame_url": "https://frw-images.aiaipic.win/users/3492453287637028864/image/20260805/c743c3df-581f-4e3f-9c8d-01029926bcfa_thumb.jpg",
"first_frame_portrait_kind": "skip",
"last_frame_url": "https://frw-images.aiaipic.win/users/3492453287637028864/image/20260805/9abd34e1-1f37-44ed-b482-386a44febf6a_thumb.jpg",
"last_frame_portrait_kind": "skip",
"aspect_ratio": "adaptive"
}
}'curl -X POST https://api.lithovas.com/api/generate \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "bytedance/seedance-2",
"input": {
"duration": 5,
"generate_audio": true,
"output_format": "mp4",
"resolution": "720p",
"return_last_frame": false,
"web_search": false,
"nsfw_checker": false,
"prompt": " @image1与 @image2在 @image3的场景中,参考 @video1的运镜,背景音乐参考 @audio1",
"aspect_ratio": "16:9",
"reference_image_urls": [
"https://frw-images.aiaipic.win/users/3514640099037941760/ai_generated/20260818/038f9f68-004f-4017-a09d-74b3da84e569.png",
"https://frw-images.aiaipic.win/users/3514640099037941760/image/20260819/fb280368-8f54-41eb-aacf-cee1c189b29b.png"
],
"reference_portrait_kinds": [
"virtual",
"skip"
],
"reference_video_urls": [
"https://frw-images.aiaipic.win/users/3492453287637028864/video/20260818/3524765235086888960.mp4"
],
"reference_audio_urls": [
"https://frw-images.aiaipic.win/users/3492453287637028864/audio/20260818/3524725649950380032.mp3"
]
}
}'