使用你的工具生成视频与图像
创建密钥,使用 Bearer 认证调用 API,并轮询任务状态直到结果就绪。适用于 Claude Code、Codex 及任何 HTTP 客户端。
快速入门
步骤1
创建密钥
在控制面板中生成 API 密钥。该密钥仅显示一次,请妥善保管。
步骤2
调用API
使用您的 Bearer 密钥和 Idempotency-Key 标头发送 POST 请求。
步骤3
获取结果
轮询任务状态端点,直到状态变为“已完成”或“失败”,然后读取输出。
身份验证
所有请求均需在 Authorization 标头中携带 Bearer API 密钥进行身份验证。
Authorization: Bearer sk_live_your_api_key
Content-Type: application/json
Idempotency-Key: a-unique-id-per-requestSeedance 2 Video
文本、图像或媒体转视频
提交任务
/api/v1/video/seedance2参数
| 参数 | 类型 | 必填 | 默认 | 允许值 |
|---|---|---|---|---|
modeGeneration mode. | string | 选填 | text-to-video | text-to-videoimage-to-videomedia-to-video |
quality_tierQuality tier. | string | 选填 | standard | standardpro |
channelRendering channel. | string | 选填 | standard | standardrealwild |
promptText prompt. | string | 必填 | — | 3–10000 chars |
aspect_ratioAspect ratio. | string | 选填 | 16:9 | 1:121:94:33:416:99:16 |
durationClip duration. | string | 选填 | 5 | 4–15 (seconds) |
resolutionOutput resolution. | string | 选填 | 720p | 720p1080p |
image_urlStart frame — required for image-to-video. | string (URL) | 选填 | — | public https URL |
end_image_urlOptional end frame. | string (URL) | 选填 | — | public https URL |
media_urlsRequired for media-to-video. | string[] (URL) | 选填 | — | ≤ 12 public https URLs |
generate_audioGenerate an audio track. | boolean | 选填 | true | truefalse |
fixed_lensLock the camera lens. | boolean | 选填 | false | truefalse |
seedNot supported on the real channel. | integer | 选填 | — | -1 – 4294967295 |
请求
curl -X POST https://seedance2ai.io/api/v1/video/seedance2 \
-H "Authorization: Bearer $SEEDANCE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: demo-video-001" \
-d '{
"mode": "text-to-video",
"quality_tier": "standard",
"prompt": "A cinematic shot of a glass train crossing a snowy mountain bridge",
"aspect_ratio": "16:9",
"duration": "5",
"resolution": "720p"
}'响应202
{
"id": "sd2_xxxxx",
"status": "processing",
"model": "seedance2",
"quality_tier": "standard",
"channel": "standard",
"credits_used": 30
}查看任务状态
/api/v1/tasks/{id}请求
curl https://seedance2ai.io/api/v1/tasks/sd2_xxxxx \
-H "Authorization: Bearer $SEEDANCE_API_KEY"响应200
{
"id": "sd2_xxxxx",
"status": "completed",
"model": "seedance2",
"quality_tier": "standard",
"channel": "standard",
"credits_used": 30,
"credits_refunded": 0,
"output": {
"video_url": "https://...",
"last_frame_url": "https://...",
"seed": 123
},
"error": null,
"created_at": "2026-06-03T10:00:00.000Z",
"updated_at": "2026-06-03T10:03:12.000Z"
}status: processing · completed · failed
错误码
All errors share this shape:
{ "error": { "code": "invalid_request", "message": "Invalid request body" } }| 代码 | HTTP | 含义 |
|---|---|---|
unauthorized | 401 | Missing, invalid, or revoked API key. |
invalid_request | 400 | Bad input or unsupported field. |
insufficient_credits | 402 | Not enough credits on the balance. |
rate_limited | 429 | Too many requests — limit is 30 requests per 60 seconds per account. Retry after the Retry-After response header (in seconds). |
idempotency_conflict | 409 | Same Idempotency-Key reused with a different body, or still running. |
service_busy | 503 | Temporary upstream or credit-concurrency issue. Retry. |
not_found | 404 | Task does not exist or does not belong to this key owner. |
internal_error | 500 | Unexpected server-side failure. |
配合 Claude Code 使用
点击“Copy for AI”,以干净的 Markdown 格式获取完整 API,将其粘贴到 Claude Code 或 Codex 中,即可自动完成集成配置。或者直接将 Agent 指向原始文本端点。
Skill
将 Seedance 技能安装到 Claude Code、Codex 或任何 agent 中——它能为你编写电影级提示词,并通过 API 直接渲染成片。
# Clone into Claude Code's skills folder
git clone https://github.com/tkaptop/seedance-skill ~/.claude/skills/seedance常见问题
谁可以使用 API?
任何拥有积分的用户均可使用。无套餐限制——任何持有积分的账户均可创建密钥并调用API。
如何获取积分?
在定价页面充值或订阅,积分将即时到账。
网站和API的积分是否共享?
是的——您的个人积分余额可用于网页生成和 API 调用。在团队中,API 调用使用每位成员自己的个人余额,而非团队共享积分池。
如何开始?
在控制面板中创建一个 API 密钥,然后使用 Bearer 令牌调用接口(参见上方快速入门指南)。
若调用返回 insufficient_credits,该如何处理?
您的余额不足——请在定价页面充值后重试。