模型市场支持← 返回应用

Seedance 2.0

Seedance 2.0 模型通过一个统一的异步任务 API 调用。用 POST /api/generate 发起任务,再轮询 GET /api/generate/{taskId} 直到完成。本系列提供 3 个端点。

概览

每个端点共享相同的外层结构 —— 只有 modelinput 字段不同。可在模型市场的 playground 中运行任意一个。

Seedance 2.0:一个 model,多种模式

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 Referencereference_image_urls + 可选视频/音频;prompt 用 @image1@video1@audio1

直连路由:人像标 virtualreal 等效)进虚拟人像库;场景/背景/产品默认 skip 直链。成功时 resultUrls 返回 /api/media/{taskId}/0.mp4 代理链接,国内可直接播放。

人像参考细节
走直连路由时,只有人像需要先上传到人像库;场景、视频、音频保持公网 URL 直传。 在 reference_image_urls 旁用 reference_portrait_kinds 逐张标记:virtual(人像入库,含真人/AI;real 等效)、skip(背景/场景,不入库;未标记时默认 skip)。 单图/首尾帧用 first_frame_portrait_kind / last_frame_portrait_kind,语义相同。

Seedance 2 参考媒体限制

以下为 97AI.PRO 当前接入的上游接口公开校验规则,不代表官方模型的永久硬限制。不同路由可能存在差异,实际可用范围以接口返回为准。

参考图片

支持格式
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
POST https://api.lithovas.com/api/generate

请求体:{ "model": "<slug>", "input": { … } }

响应:{ "taskId": "<id>", "state": "waiting" }

查询结果

GET
GET https://api.lithovas.com/api/generate/<taskId>

响应:{ "taskId", "state": "waiting" | "success" | "fail", "resultUrls": [ … ], "creditsConsumed", "failMsg", "balance" }

成功响应示例
JSON
{
  "state": "success",
  "resultUrls": [
    "https://www.lithovas.com/api/media/task_97ai_example/0.mp4"
  ],
  "creditsConsumed": 161,
  "balance": 9958,
  "_comment": "resultUrls 为 97AI 第一方代理链接,国内可直接播放;服务端会按需刷新上游签名后再回源。"
}
异步
创建任务返回 200 只表示任务已被接受 —— 并非已完成。请轮询此端点,直到 state 变为 successfail。失败任务不计费。

端点

模型任务model slug
Seedance 2Image to Videobytedance/seedance-2
Seedance 2 FastImage to Videobytedance/seedance-2-fast
Seedance 2 MiniImage to Videobytedance/seedance-2-mini

Seedance 2 · Image to Video

POSTImage to Videobytedance/seedance-2
input 字段
promptstring必填

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
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

POSTImage to Videobytedance/seedance-2-fast
input 字段
promptstring必填

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
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

POSTImage to Videobytedance/seedance-2-mini
input 字段
promptstring必填

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
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 即可测试不同档位。

单图生视频(人像首帧 + virtual)
cURL
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"
  }
}'
首尾帧(场景 skip + adaptive)
cURL
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"
  }
}'
Omni Reference(人像 virtual + 场景 skip)
cURL
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"
    ]
  }
}'