> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bytedance.mom/llms.txt
> Use this file to discover all available pages before exploring further.

# Seedance 2.0 API 全能参考

<Tip>
  点击上方的“**复制页面**”可发给 AI 自动写对接代码

  多模态&全能参考模型，可传人像图(名人&明星除外)。满血满参数直连，不降智，对参考图的理解和指令遵循能力做了深度优化。
</Tip>

## 1、身份认证

<ParamField query="Authorization" type="string" required>
  所有接口均需要使用 Bearer Token 进行认证

  获取 API Key：访问 [**API Key 管理页面**](https://api.bytedance.mom/keys) 获取您的 API Key

  使用时在请求头中添加：

  ```text theme={null}
  Authorization: Bearer YOUR_API_KEY
  Content-Type: application/json
  ```
</ParamField>

<Info>
  请求方法：`POST`

  请求路径：`https://api.bytedance.mom/v1/videos`
</Info>

## 2、请求参数

<ParamField query="model" path="param" type="string" required>
  模型名称，必传。可传"sd2-video"或"sd2-video-fast"
</ParamField>

<ParamField query="prompt" path="param" type="string" required>
  视频生成提示词，必传。最大可传 1000 个字符（Seedance官方建议不超过1000字）

  该模型为国产模型，对中文提示词的理解程度与英文持平甚至高于英文，有条件的情况下建议用中文写

  提示词可以这样写 `@图片1` / `@视频1` / `@音频1` 来指定参考素材
</ParamField>

<ParamField query="seconds" path="param" type="string" required>
  要生成的视频时长，必传。可选 4-15秒。示例："15"
</ParamField>

<ParamField query="aspect_ratio" path="param" type="string" required>
  视频比例，必传。"9:16", "16:9", "1:1", "21:9", "3:4", "4:3"
</ParamField>

<ParamField query="resolution" path="param" type="string">
  分辨率，非必传。默认"720p"。可传"720p", "1080p", "2k", "4k"
</ParamField>

<ParamField query="images" path="param" type="list">
  参考图片，数组，非必传。传入公网可访问的图片链接，图片数量不得超过 9 张，建议格式：jpg、jpeg、png。图片+视频+音频数量不得超过 9
</ParamField>

<ParamField query="videos" path="param" type="list">
  参考视频，数组，非必传。传入公网可访问的视频链接，视频数量不得超过 3 条，建议格式：mp4、mov，单条视频时长2-14秒。图片+视频+音频数量不得超过 9
</ParamField>

<ParamField query="audios" path="param" type="list">
  参考音频，数组，非必传。传入公网可访问的音频链接，音频数量不得超过 3 条，建议格式：mp3、wav，单条音频时长2-14秒。图片+视频+音频数量不得超过 9。传音频的时候，必须也要传至少 1 张图片或者至少 1 段视频。
</ParamField>

<RequestExample>
  ```text 请求示例(CURL) theme={null}
  // 发起视频生成请求
  curl -X POST https://api.bytedance.mom/v1/videos \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <api-key>" \
    -d '{
      "model": "sd2-video",
      "prompt": "参考 @图片1 的场景和 @视频1 的运镜，生成一段北极光视频",
      "seconds": "15",
      "resolution": "720p",
      "aspect_ratio": "9:16",
      "images": ["https://example.com/scene.jpg"],
      "videos": ["https://example.com/camera.mp4"]
    }'
  ```
</RequestExample>

## 3、响应参数

<ResponseField name="id" type="string" required>
  视频任务ID，相当于钥匙，每一条视频都有专属的钥匙，后续用它可以取出来视频链接。

  请用这个ID调取 [视频生成结果查询](https://app.mintlify.com/bytedance-44e82b6f/bytedance-44e82b6f/editor/main/~/eee5b841-cdf5-40e5-80ce-1704bc6eaabf) 接口。
</ResponseField>

<ResponseExample>
  ```text 响应示例(任务提交成交) theme={null}
  // 接收视频任务状态 - 成功
  {
  	"id": "task_CB9Kh0oDzSYgaBskqpbnzQB4Y1TiwyCn", // 视频任务ID
  	"task_id": "task_CB9Kh0oDzSYgaBskqpbnzQB4Y1TiwyCn",
  	"object": "video",
  	"model": "sd2-video",
  	"status": "queued",
  	"progress": 0,
  	"created_at": 1785056192,
  	"seconds": "15"
  }
  ```

  ```text 响应示例(任务提交失败) theme={null}
  // 接收视频任务状态 - 失败
  {
    "error": {
      "message": "错误描述",
      "type": "invalid_request_error",
      "code": "model_not_found"
    }
  }
  ```
</ResponseExample>
