Seedance 2.5 API 接入文档
通过 Rivya Public API v1 调用 Seedance 2.5,包含模型 ID seedance-2-5、输入类型、参数、Files API 规则、积分和响应示例。
seedance-2-5
text, file
参考素材模式需要
per_input_and_output_second · 480p_with_video=17 · 480p_without_video=28 · 720p_with_video=38 · 720p_without_video=63 · 1080p_with_video=68.5 · 1080p_without_video=114 · ⌈total⌉
视频
METERED
30000 字符
请求字段
模型 ID 放在顶层字段。模型专属控制项放入 params。
| Key | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| model | string | 是 | seedance-2-5 | 使用 seedance-2-5 作为 API 模型 ID。 |
| prompt | string | 否 | - | 这个模型最多 30000 个字符。 |
| params | object | 否 | - | 模型专属参数对象。可用 key 见下方参数表。 |
| client_request_id | string | 否 | - | 可选客户端请求 ID,便于你在自己的系统中追踪请求。 |
模型参数
| Key | 类型 | 必填 | 默认值 | 范围 | 枚举值 | 说明 |
|---|---|---|---|---|---|---|
| seedance_scene | select | 否 | text | - | text, frames, reference | 上传前选择输入范围;文字、帧引导和参考素材是互斥场景。 |
| resolution | select | 否 | 720p | - | 480p, 720p, 1080p | 每档分辨率都有独立的无视频和有视频费率。 |
| aspect_ratio | select | 否 | adaptive | - | 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive | 画幅比例 |
| duration | number | 否 | 5 | min -1 / max 30 / step 1 | - | 选择 -1 使用自动时长,或选择 4 至 30 秒之间的整数。自动时长会在运行前预留 30 个输出秒。 |
| output_format | select | 否 | mp4 | - | mp4, mov | 输出格式 |
| generate_audio | select | 否 | true | - | true, false | 请求随输出短片一起生成音频。 |
| return_last_frame | select | 否 | false | - | false, true | 同时把视频最终帧作为静态图片返回,用于审核或后续制作。 |
| web_search | select | 否 | false | - | false, true | 允许模型在本次生成中使用可选的网页搜索控制项。 |
| nsfw_checker | select | 否 | true | - | false, true | 启用模型的可选内容过滤器。任何自动过滤器都无法保证完整覆盖。 |
上传策略
先上传参考文件,再把返回的 URL 和 durationToken 放入 params.referenceMediaItems。
引导帧或大容量参考素材: 帧场景接受 1 至 2 张 JPEG、PNG、WebP、BMP、GIF 或 TIFF 图片,每张不超过 30 MB。参考场景接受最多 30 张图片、10 段不超过 95 MB 且每段 2-30 秒的 MP4/MOV 视频,以及 10 个不超过 15 MB 且每个 2-30 秒的 MP3/WAV 音频文件;视频与音频总时长分别不得超过 30 秒,全部媒体合计不得超过 50 个文件。
50
image, video, audio
视频和音频参考素材需要时长校验时,应携带 /api/v1/files 返回的 durationToken。
| kind | 大小上限 | MIME 类型 |
|---|---|---|
| image | 30 MB | image/jpeg, image/png, image/webp, image/bmp, image/gif, image/tiff |
| video | 95 MB | video/mp4, video/quicktime |
| audio | 15 MB | audio/mpeg, audio/wav, audio/x-wav |
最小请求
{
"model": "seedance-2-5",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"seedance_scene": "text",
"resolution": "720p",
"aspect_ratio": "adaptive",
"duration": 5,
"output_format": "mp4",
"generate_audio": "true",
"return_last_frame": "false",
"web_search": "false",
"nsfw_checker": "true"
}
}参考文件请求
{
"model": "seedance-2-5",
"prompt": "A cinematic product reveal with smooth camera movement",
"params": {
"seedance_scene": "reference",
"resolution": "720p",
"aspect_ratio": "adaptive",
"duration": 5,
"output_format": "mp4",
"generate_audio": "true",
"return_last_frame": "false",
"web_search": "false",
"nsfw_checker": "true",
"referenceMediaItems": [
{
"url": "https://cdn.example.com/reference-video.mp4",
"kind": "video",
"name": "reference-video.mp4",
"mimeType": "video/mp4",
"durationSeconds": 8,
"durationToken": "video_duration_token_from_files_api",
"width": 1280,
"height": 720,
"sizeBytes": 8388608,
"framesPerSecond": 30,
"videoBitrateMbps": 8,
"videoMetadataToken": "video_metadata_token_from_original_files_api_upload_response"
}
]
}
}创建响应
创建接口会返回公开任务 ID。继续轮询状态接口,直到任务成功或失败。
{
"id": "task_seedance_2_5_example",
"status": "queued",
"model": "seedance-2-5",
"reserved_credits": 315,
"final_credits": 0,
"settlement_status": "RESERVED",
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}常见错误
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
部分模式需要通过 Files API 上传参考素材。