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

# seedance-2.5

> 使用文本、图片、视频和音频参考创建 Seedance 2.5 视频生成任务。



## OpenAPI

````yaml zh/api-reference/model-api/bytedance/openapi/seedance-2-5/openapi.yaml POST /v1/video/generations
openapi: 3.1.0
info:
  title: Seedance 2.5
  description: Seedance 2.5 多模态参考、视频编辑、视频延长和同步音频生成 API。
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/video/generations:
    post:
      summary: 创建视频生成任务
      description: |
        创建 Seedance 2.5 异步任务，支持文生视频、首帧/首尾帧生视频、多模态参考生视频、视频编辑和视频延长。

        轮询 `GET /v1/video/generations/{id}`，直到 `status` 为 `succeeded`。
      operationId: createSeedance25
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - content
              properties:
                model:
                  type: string
                  enum:
                    - seedance-2.5
                  description: AnyFast 模型 ID。
                  example: seedance-2.5
                content:
                  type: array
                  minItems: 1
                  maxItems: 51
                  description: >
                    输入内容。可选文本提示词放在第一项，后面依次放媒体素材。Seedance 2.5 最多支持 30 张参考图、10
                    个参考视频和 10 段参考音频；视频和音频素材各自的总时长不得超过 30 秒。完整请求体不得超过 64
                    MB，大文件不要使用 Base64。
                  items:
                    type: object
                    required:
                      - type
                    properties:
                      type:
                        type: string
                        enum:
                          - text
                          - image_url
                          - video_url
                          - audio_url
                        description: 内容类型。
                      text:
                        type: string
                        description: 可选提示词。使用 `@图像1`、`@视频1`、`@音频1` 按媒体类型和顺序引用素材。
                      image_url:
                        type: object
                        description: 图片输入，支持公网 URL、Base64 或 `asset://<ASSET_ID>`。
                        properties:
                          url:
                            type: string
                            description: >-
                              JPEG、PNG、WebP、BMP、TIFF、GIF、HEIC 或 HEIF。宽高比
                              0.4–2.5；宽和高分别为 300–6000 px；单张小于 30 MB。
                      video_url:
                        type: object
                        description: 视频输入，支持公网 URL 或 `asset://<ASSET_ID>`。
                        properties:
                          url:
                            type: string
                            description: >-
                              MP4 或 MOV，视频编码为 H.264/H.265，音频编码为 AAC/MP3。分辨率 480p
                              或 720p；时长 2–30 秒；帧率 24–60 FPS；宽高比 0.4–2.5；宽和高分别为
                              300–6000 px；每帧总像素数 409,600–8,295,044；最大 200 MB。
                      audio_url:
                        type: object
                        description: 音频输入。Seedance 2.5 支持仅使用音频作为参考生成视频。
                        properties:
                          url:
                            type: string
                            description: >-
                              WAV 或 MP3，时长 2–30 秒，单个不超过 15 MB；支持 URL、Base64 或素材
                              ID。
                      role:
                        type: string
                        enum:
                          - first_frame
                          - last_frame
                          - reference_image
                          - reference_video
                          - reference_audio
                        description: >
                          素材角色。图生视频使用 `first_frame` 和可选的
                          `last_frame`；参考生成、编辑和延长使用 `reference_*`。
                  example:
                    - type: text
                      text: 电影感跟拍镜头，@图像1 中的人物走过雨夜霓虹街道
                    - type: image_url
                      image_url:
                        url: https://example.com/character.jpg
                      role: reference_image
                callback_url:
                  type: string
                  format: uri
                  description: 可选回调地址。异步任务状态变化时，平台会向此地址发送 POST 通知。
                execution_expires_after:
                  type: integer
                  default: 172800
                  description: 排队中或运行中的任务在过期前允许执行的最长时间，单位为秒。
                priority:
                  type: integer
                  default: 0
                  description: 任务执行优先级。
                safety_identifier:
                  type: string
                  description: 用于安全追踪的稳定终端用户标识。
                seed:
                  type: integer
                  default: -1
                  description: 随机种子；`-1` 表示使用随机种子。
                service_tier:
                  type: string
                  default: default
                  description: 任务服务等级。
                generate_audio:
                  type: boolean
                  default: true
                  description: 生成同步台词、音效和背景音。
                resolution:
                  type: string
                  enum:
                    - 480p
                    - 720p
                  default: 720p
                  description: 输出视频分辨率。
                ratio:
                  type: string
                  enum:
                    - '21:9'
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                    - adaptive
                  default: adaptive
                  description: >
                    输出宽高比。文生视频和普通参考生视频使用 `adaptive`
                    时会自动选择合适的宽高比；编辑和延长任务跟随目标视频；首帧任务跟随首帧图片。视频编辑、视频延长以及首帧/首尾帧任务必须使用
                    `adaptive`。
                duration:
                  type: integer
                  enum:
                    - -1
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 9
                    - 10
                    - 11
                    - 12
                    - 13
                    - 14
                    - 15
                    - 16
                    - 17
                    - 18
                    - 19
                    - 20
                    - 21
                    - 22
                    - 23
                    - 24
                    - 25
                    - 26
                    - 27
                    - 28
                    - 29
                    - 30
                  default: -1
                  description: >
                    输出时长，单位为秒。`-1` 表示由模型在 4–30 秒内自动选择；视频编辑必须使用 `-1`
                    并跟随源视频时长，最多可能比源视频短 0.4 秒；视频延长和首帧/首尾帧生成可使用 `-1` 或 4–30。
                output_format:
                  type: string
                  enum:
                    - mp4
                    - mov
                  default: mp4
                  description: 输出容器。MOV 使用 H.264/yuv444p 视频和 PCM 音频，适合后续编辑。
                tools:
                  type: array
                  description: 可选生成工具。文生视频支持联网搜索。
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - web_search
                watermark:
                  type: boolean
                  default: false
                  description: 是否在右下角添加“AI 生成”水印。
                return_last_frame:
                  type: boolean
                  default: false
                  description: 是否返回生成视频的最后一帧图片。
      responses:
        '200':
          description: 视频生成任务已创建
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - task_id
                  - object
                  - model
                  - status
                  - progress
                  - created_at
                properties:
                  id:
                    type: string
                    description: 用于轮询的任务 ID。
                    example: asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E
                  task_id:
                    type: string
                    description: 任务 ID，与 `id` 相同。
                    example: asyntask_h81efT0qwtLnzyt6VENmCZ6VXSfNxE2E
                  object:
                    type: string
                    enum:
                      - video
                    example: video
                  model:
                    type: string
                    enum:
                      - seedance-2.5
                    example: seedance-2.5
                  status:
                    type: string
                    enum:
                      - queued
                    description: 异步任务的初始状态。
                    example: queued
                  progress:
                    type: integer
                    description: 初始任务进度百分比。
                    example: 0
                  created_at:
                    type: integer
                    description: Unix 时间戳。
                    example: 1786084139
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````