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

# Seedance 2.0 Mini 视频生成

> seedance-2.0-mini 的生成请求与响应。

## 模型选择

| 模型 ID | 请求地址 |
| - | - |
| `seedance-2.0-mini` | `POST /v1/videos` |

## 主要参数

下表列出常用参数；媒体引用的组合限制以接口校验结果为准。

| 字段 | 取值或限制 | 说明 |
| - | - | - |
| `model` | `seedance-2.0-mini` | 模型 ID |
| `prompt` | string | 内容描述；此型号无字符数上限，使用素材时可选 |
| `duration` | 4–15；默认 `5` | 输出时长（秒）；当前网关仅接受此区间的整数，不接受 -1 |
| `size` | `16:9`、`9:16`、`1:1`、`4:3`、`3:4`、`21:9`、`adaptive`；默认 `16:9` | 视频宽高比；部分参考素材或编辑模式有额外限制 |
| `resolution` | `480p`、`720p`；默认 `720p` | 输出分辨率 |
| `image_urls` | 最多 9 项 | 参考图片，可作为图生视频或多模态参考素材 |
| `image_with_roles` | 最多 9 项 | 带角色的参考图；不能与 image\_urls 同时传入 |
| `video_urls` | 最多 3 项 | 参考视频地址；实际时长与格式还需符合模型的素材限制 |
| `audio_urls` | 最多 3 项 | 参考音频地址；实际时长与格式还需符合模型的素材限制 |
| `seed` | integer | 随机种子 |
| `generate_audio` | `true` / `false`；默认 `false` | 是否生成配套音频 |
| `return_last_frame` | `true` / `false`；默认 `false` | 请求生成尾帧；当前网关任务结果只提供主视频文件，不公开尾帧 |
| `tools` | array | 可选联网搜索工具，如 `[{"type":"web_search"}]` |

## 素材规则

`image_urls` 与带 `url` / `role` 的 `image_with_roles` 不能同时提供。首尾帧与视频或音频参考素材的组合需遵守模型限制。
参考视频与音频的时长、格式及总时长需符合当前模型的限制。

## 返回说明

提交后返回任务 ID，不表示视频已经完成。请在 [任务查询](/videos/task) 中用同一用户的密钥查询状态和结果。


## OpenAPI

````yaml generated/seedance-2.0-mini.json POST /v1/videos
openapi: 3.0.3
info:
  title: new-api Seedance 2.0 Mini API
  version: 0.1.0
servers:
  - url: https://ai.xbrod.com
    description: 本项目线上 API 网关
security:
  - bearerAuth: []
paths:
  /v1/videos:
    post:
      summary: Seedance 2.0 Mini 视频生成
      description: 使用当前模型发起生成请求。
      operationId: generate_seedance_2_0_mini
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - seedance-2.0-mini
                  description: 模型 ID
                prompt:
                  type: string
                  description: 内容描述；此型号无字符数上限，使用素材时可选
                duration:
                  type: integer
                  minimum: 4
                  maximum: 15
                  default: 5
                  description: 输出时长（秒）；当前网关仅接受此区间的整数，不接受 -1
                size:
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                    - '21:9'
                    - adaptive
                  default: '16:9'
                  description: 视频宽高比；部分参考素材或编辑模式有额外限制
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                  default: 720p
                  description: 输出分辨率
                image_urls:
                  type: array
                  maxItems: 9
                  items:
                    type: string
                  description: 参考图片，可作为图生视频或多模态参考素材
                image_with_roles:
                  type: array
                  maxItems: 9
                  description: 带角色的参考图；不能与 image_urls 同时传入
                  items:
                    type: object
                    required:
                      - url
                      - role
                    properties:
                      url:
                        type: string
                      role:
                        type: string
                        enum:
                          - first_frame
                          - last_frame
                          - reference_image
                video_urls:
                  type: array
                  maxItems: 3
                  items:
                    type: string
                  description: 参考视频地址；实际时长与格式还需符合模型的素材限制
                audio_urls:
                  type: array
                  maxItems: 3
                  items:
                    type: string
                  description: 参考音频地址；实际时长与格式还需符合模型的素材限制
                seed:
                  type: integer
                  description: 随机种子
                generate_audio:
                  type: boolean
                  default: false
                  description: 是否生成配套音频
                return_last_frame:
                  type: boolean
                  default: false
                  description: 请求生成尾帧；当前网关任务结果只提供主视频文件，不公开尾帧
                tools:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - web_search
                  description: 可选联网搜索工具，如 `[{"type":"web_search"}]`
              required:
                - model
            example:
              model: seedance-2.0-mini
              prompt: 湖面上的纸船，日出时的柔和光线
              size: '16:9'
              duration: 5
              resolution: 720p
      responses:
        '200':
          description: 任务已提交，视频文件尚未生成
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  object:
                    type: string
                  status:
                    type: string
                  model:
                    type: string
              example:
                id: task_example
                object: video
                status: queued
                model: seedance-2.0-mini
        '400':
          description: 模型未启用、缺少提示词或媒体引用，或参数超出模型限制
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 本项目签发的 API 密钥，不是上游密钥

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.