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

# Seedance 2.0 Fast 首尾帧生视频

> 适用于 `dreamina-seedance-2-0-fast-260128` 模型。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/byteplus/dreamina-seedance-2-0-fast-first-last-frame-to-video.json POST /v1/videos
openapi: 3.0.1
info:
  title: Seedance 2.0 Fast 首尾帧生视频
  version: 1.0.0
  description: Dreamina Seedance 2.0 Fast 首尾帧生视频能力。
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API 服务地址
security: []
tags:
  - name: Seedance Video
    description: Seedance 系列视频生成能力
paths:
  /v1/videos:
    post:
      tags:
        - Seedance Video
      summary: Seedance 2.0 Fast 首尾帧生视频
      description: 适用于 `dreamina-seedance-2-0-fast-260128` 模型。
      operationId: seedance20FastFirstLastFrameToVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FirstLastFrameToVideoRequest'
            examples:
              first_last_frame:
                summary: 基础首尾帧生视频
                value:
                  model: dreamina-seedance-2-0-fast-260128
                  media:
                    - type: text
                      text: 镜头在两个状态间平滑过渡
                    - type: first_frame
                      url: https://example.com/start.jpg
                    - type: last_frame
                      url: https://example.com/end.jpg
                  seconds: '5'
                  size: 720p
                  ratio: adaptive
      responses:
        '200':
          description: 提交成功，返回视频任务对象。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
        '400':
          description: 请求参数不合法。
        '401':
          description: 鉴权失败。
        '429':
          description: 请求频率超限。
        '500':
          description: 服务端内部错误。
      security:
        - BearerAuth: []
components:
  schemas:
    FirstLastFrameToVideoRequest:
      type: object
      required:
        - model
        - media
      properties:
        model:
          type: string
          enum:
            - dreamina-seedance-2-0-fast-260128
          description: 您需要调用的模型的 ID （Model ID）
        media:
          type: array
          minItems: 3
          items:
            $ref: '#/components/schemas/VideoMediaInput'
          description: >-
            多模态输入数组。2.0 Fast 支持
            `text`、`first_frame`、`last_frame`、`reference_image`、`reference_video`、`reference_audio`。
        seconds:
          type: string
          description: >-
            生成视频时长，仅支持整数，单位：秒。


            * Seedance 1.0 pro、Seedance 1.0 pro fast: [2, 12] s。

            * Seedance 1.5 pro: [4,12] 或设置为 -1

            * Seedance 2.0 系列: [4,15] 或设置为 -1


            **注意**


            Seedance 2.0 系列、Seedance 1.5 pro 支持两种配置方法

            * 指定具体时长：支持有效范围内的任一整数。

            * 智能指定：设置为 -1，表示由模型在有效范围内自主选择合适的视频长度（整数秒）。实际生成视频的时长可通过查询视频生成任务 API
            返回的 duration 字段获取。注意视频时长与计费相关，请谨慎设置。
          default: '5'
          example: '5'
          enum:
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - '10'
            - '11'
            - '12'
            - '15'
            - '-1'
        size:
          type: string
          enum:
            - 480p
            - 720p
          description: >-
            > Seedance 2.0 系列、Seedance 1.5 pro 默认值：`720p`

            > Seedance 1.0 pro & pro-fast 默认值：`1080p`


            视频分辨率，枚举值：


            * 480p

            * 720p

            * 1080p：Seedance 2.0 Fast 和 Seedance 2.0 Mini 不支持。

            * 4k：仅 Seedance 2.0 支持


            ```说明

            - 相较于一般的 8bit 位深，Seedance 2.0 输出的 4k 视频采用 10bit
            位深编码，能够完整保留丰富的色彩层次与平滑的渐变过渡，满足专业影视制作与 HDR 视频内容的要求。

            - 4k 视频采用 H.265 (HEVC) 编码格式输出，部分播放器/浏览器可能无法直接播放。
          default: 720p
        ratio:
          type: string
          enum:
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
            - '21:9'
            - adaptive
          description: >-
            > Seedance 2.0 系列、Seedance 1.5 pro 默认值为 `adaptive`

            > 其他模型：文生视频默认值 `16:9`，图生视频默认值 `adaptive`


            生成视频的宽高比例。不同宽高比对应的宽高像素值见下方表格。


            * 16:9

            * 4:3

            * 1:1

            * 3:4

            * 9:16

            * 21:9

            * adaptive：根据输入自动选择最合适的宽高比（详见下文说明）


            **adaptive 适配规则**


            当配置 ratio 为 adaptive 时，模型会根据生成场景自动适配宽高比；实际生成的视频宽高比可通过查询视频生成任务 API
            返回的 ratio 字段获取。


            **支持模型：**

            * Seedance 2.0 系列、Seedance 1.5 Pro 支持

            * 其他模型仅图生视频场景支持


            **取值规则：**

            * 文生视频：根据输入的提示词，智能选择最合适的宽高比。

            * 首帧 / 首尾帧生视频：根据上传的首帧图片比例，自动选择最接近的宽高比。

            *
            多模态参考生视频：根据用户提示词意图判断，如果是首帧生视频/编辑视频/延长视频，以该图片/视频为准选择最接近的宽高比；否则，以传入的第一个媒体文件为准（优先级：视频＞图片）选择最接近的宽高比。


            不同宽高比对应的宽高像素值


            注意：图生视频，选择的宽高比与您上传的图片宽高比不一致时，方舟会对您的图片进行裁剪，裁剪时会居中裁剪。


            | 分辨率 | 宽高比 | 宽高像素值 Seedance 2.0 系列 | 宽高像素值 Seedance 1.5 pro | 宽高像素值
            Seedance 1.0 系列 |

            |---|---|---|---|---|

            | 480p | 16:9 | 864×496 | 864×496 | 864×480 |

            | | 4:3 | 752×560 | 752×560 | 736×544 |

            | | 1:1 | 640×640 | 640×640 | 640×640 |

            | | 3:4 | 560×752 | 560×752 | 544×736 |

            | | 9:16 | 496×864 | 496×864 | 480×864 |

            | | 21:9 | 992×432 | 992×432 | 960×416 |

            | 720p | 16:9 | 1280×720 | 1280×720 | 1248×704 |

            | | 4:3 | 1112×834 | 1112×834 | 1120×832 |

            | | 1:1 | 960×960 | 960×960 | 960×960 |

            | | 3:4 | 834×1112 | 834×1112 | 832×1120 |

            | | 9:16 | 720×1280 | 720×1280 | 704×1248 |

            | | 21:9 | 1470×630 | 1470×630 | 1504×640 |

            | 1080p（Seedance 2.0 Fast、Seedance 2.0 Mini 不支持）| 16:9 | 1920×1080 |
            1920×1080 | 1920×1088 |

            | | 4:3 | 1664×1248 | 1664×1248 | 1664×1248 |

            | | 1:1 | 1440×1440 | 1440×1440 | 1440×1440 |

            | | 3:4 | 1248×1664 | 1248×1664 | 1248×1664 |

            | | 9:16 | 1080×1920 | 1080×1920 | 1088×1920 |

            | | 21:9 | 2206×946 | 2206×946 | 2176×928 |

            | 4K(仅 Seedance 2.0 支持) | 16:9 | 3840×2160 | - | - |

            | | 4:3 | 3326×2494 | - | - |

            | | 1:1 | 2880×2880 | - | - |

            | | 3:4 | 2494×3326 | - | - |

            | | 9:16 | 2160×3840 | - | - |

            | | 21:9 | 4398×1886 | - | - |
          default: adaptive
        seed:
          type: integer
          description: >-
            > Seedance 2.0系列暂不支持

             种子整数，用于控制生成内容的随机性。取值范围：[-1, 2^32-1]之间的整数。

            注意：

            *
            相同的请求下，模型收到不同的seed值，如：不指定seed值或令seed取值为-1（会使用随机数替代）、或手动变更seed值，将生成不同的结果。

            * 相同的请求下，模型收到相同的seed值，会生成类似的结果，但不保证完全一致。
          default: -1
          minimum: -1
          maximum: 4294967295
        watermark:
          type: boolean
          description: |-
            生成视频是否包含水印。

            * false：生成视频不含水印。
            * true：生成视频右下角会展示 AI 生成 水印。
          default: false
        generate_audio:
          type: boolean
          description: >-
            > 仅 Seedance 2.0 系列、Seedance 1.5 pro 支持


            控制生成的视频是否包含与画面同步的声音。


            *
            true：模型输出的视频包含同步音频。模型会基于文本提示词与视觉内容，自动生成与之匹配的人声、音效及背景音乐。建议将对话部分置于双引号内，以优化音频生成效果。例如：男人叫住女人说："你记住，以后不可以用手指指月亮。"

            * false：模型输出的视频为无声视频。


            注意：生成的有声视频均为单声道，和传入的音频声道数无关。
          default: true
        return_last_frame:
          type: boolean
          description: >-
            true：返回生成视频的尾帧图像。设置为 true 后，可通过查询视频生成任务接口获取视频的尾帧图像。尾帧图像的格式为
            png，宽高像素值与生成的视频保持一致，无水印。


            使用该参数可实现生成多个连续视频：以上一个生成视频的尾帧作为下一个视频任务的首帧，快速生成多个连续视频。


            false：不返回生成视频的尾帧图像。
          default: false
        safety_identifier:
          type: string
          description: >-
            终端用户的唯一标识符，用于协助平台检测您的应用中可能违反火山方舟使用政策的用户。该标识符为英文字符串，需保证对单个用户固定且唯一，长度不超过
            64 个字符。推荐传入对用户名、用户 ID 或邮箱进行哈希处理后生成的字符串，避免泄露用户隐私信息。
    VideoTaskResponse:
      type: object
      properties:
        id:
          type: string
          description: >-
            视频生成任务 ID 。仅保存 7 天（从 created at 时间戳开始计算），超时后将自动清除。


            * 设置 "draft": true，为 Draft 视频任务 ID。

            * 设置 "draft": false，为正常视频任务 ID。


            创建视频生成任务为异步接口，获取 ID 后，需要通过查询视频生成任务 API 来查询视频生成任务的状态。任务成功后，会输出生成视频的
            video_url。
    VideoMediaInput:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - first_frame
            - last_frame
          description: 媒体类型。`text` 需要 `text` 字段；其他类型需要 `url` 字段。
        url:
          type: string
          description: 媒体地址。`type=text` 时不需要；其他类型必填。
        text:
          type: string
          description: 文本内容。`type=text` 时必填；其他类型不需要。
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````