Seedance 1.5 API 文档

将 Seedance 1.5 视频生成 API 集成到您的应用程序的完整指南。

API v1 · 1.5 Base URL: https://seedanceapi.org/v1

快速开始

bash
1curl -X POST 'https://seedanceapi.org/v1/generate' \
2 -H 'Authorization: Bearer YOUR_API_KEY' \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "prompt": "A cinematic shot of mountains at sunrise with flowing clouds",
6 "aspect_ratio": "16:9",
7 "resolution": "720p",
8 "duration": "8"
9 }'

身份认证

所有 API 请求都需要在 Authorization 头中使用 Bearer 令牌进行身份验证。

重要提示: 您可以在控制面板的 API Keys 页面获取您的 API 密钥。 → 获取 API 密钥

http
1Authorization: Bearer YOUR_API_KEY

定价

480p

480p 分辨率

快速生成,适合预览和草稿

时长无音频含音频
4s8 credits14 credits
8s14 credits28 credits
12s19 credits38 credits
720p

720p 分辨率

高质量输出,推荐用于正式项目

时长无音频含音频
4s14 credits28 credits
8s28 credits56 credits
12s42 credits84 credits

API 端点

POST/v1/generate

使用 Seedance 1.5 模型创建新的视频生成任务。支持文生视频和图生视频模式。

请求体

Body ParametersJSON
prompt:string

视频描述文本(最多 2000 字符)

aspect_ratio:optional string

输出宽高比。支持:1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 9:21 Defaults to 1:1.

resolution:optional string

视频分辨率:480p720p Defaults to 720p.

duration:optional string

视频时长(秒):4812 Defaults to 8.

generate_audio:optional boolean

启用 AI 音频生成 Defaults to false.

fixed_lens:optional boolean

锁定镜头以减少运动模糊 Defaults to false.

image_urls:optional string[]

参考图片 URL 数组,用于图生视频(最多 1 张)

callback_url:optional string

异步状态通知的 Webhook URL。必须是公网可访问地址(不支持 localhost)。

文生视频

json
1{
2 "prompt": "A majestic eagle soaring through golden sunset clouds over ocean waves",
3 "aspect_ratio": "16:9",
4 "resolution": "720p",
5 "duration": "8"
6}

图生视频

json
1{
2 "prompt": "The character slowly turns and smiles at the camera",
3 "image_urls": [
4 "https://example.com/my-image.jpg"
5 ],
6 "aspect_ratio": "16:9",
7 "resolution": "720p",
8 "duration": "4"
9}

含音频生成

json
1{
2 "prompt": "A peaceful river flowing through a forest with birds singing",
3 "aspect_ratio": "16:9",
4 "resolution": "720p",
5 "duration": "8",
6 "generate_audio": true,
7 "fixed_lens": true
8}

响应

Task created successfully

1{
2 "code": 200,
3 "message": "success",
4 "data": {
5 "task_id": "seed15abc123def456pro",
6 "status": "IN_PROGRESS"
7 }
8}
GET/v1/status

检查视频生成任务的状态,并在完成后获取结果。

查询参数

Body ParametersJSON
task_id:string

生成接口返回的唯一任务 ID

请求示例

bash
1curl -X GET 'https://seedanceapi.org/v1/status?task_id=seed15abc123def456pro' \
2 -H 'Authorization: Bearer YOUR_API_KEY'

💡 Tip: 状态 API 中的 response 字段是一个视频 URL 数组,您可以直接通过 data.response[0] 获取视频 URL。

javascript
1// Extract video URL from response
2const videoUrl = data.response[0];

响应

1{
2 "code": 200,
3 "message": "success",
4 "data": {
5 "task_id": "seed15abc123def456pro",
6 "status": "SUCCESS",
7 "consumed_credits": 28,
8 "created_at": "2026-02-07T10:30:00Z",
9 "request": {
10 "prompt": "A majestic eagle soaring through golden sunset clouds",
11 "aspect_ratio": "16:9",
12 "resolution": "720p",
13 "duration": "8"
14 },
15 "response": [
16 "https://cdn.example.com/videos/seed15abc123def456pro.mp4"
17 ],
18 "error_message": null
19 }
20}

API 测试工具

直接在浏览器中测试 API。将 YOUR_API_KEY 替换为您的实际 API 密钥。

API 测试沙盒POST

错误代码

StatusCodeDescription
400 错误请求INVALID_PROMPT提示词无效或为空
400 错误请求INVALID_ASPECT_RATIO不支持的宽高比
400 错误请求INVALID_RESOLUTION分辨率必须是 480p 或 720p
400 错误请求INVALID_DURATION时长必须是 4、8 或 12 秒
400 错误请求TOO_MANY_IMAGESimage_urls 数组最多允许 1 张图片
401 未授权INVALID_API_KEYAPI 密钥缺失或无效
402 INSUFFICIENT_CREDITS积分不足
404 未找到TASK_NOT_FOUND任务 ID 未找到或不属于您的账户
500 服务器内部错误INTERNAL_ERROR服务器错误,请稍后重试