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

# Seedance 2

> Seedance 2 API 可根据文本、最多两帧图片，或图片、视频和音频参考生成 4–15 秒的视频。更快的变体仅支持 480p 和 720p。

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.poyo.ai/zh/api-manual/task-management/status.md)接口获取结果。

## 模型

* **seedance-2** - 标准 Seedance 2 视频生成模型
* **seedance-2-fast** - 更快、成本更低的 Seedance 2 变体

## 功能

* **文生视频**：直接根据提示词文本生成视频
* **首尾帧控制**：最多使用 2 张图片作为首帧和尾帧
* **多模态参考**：使用参考图片、视频和音频引导生成
* **可选音频**：请求在生成视频的同时生成音频

## 注意事项

* `seedance-2` 是默认的标准质量变体

* `seedance-2` 支持 `480p`、`720p`、`1080p` 和 `4k`

* `seedance-2-fast` 使用相同的输入结构，但针对更低延迟进行了优化，仅支持 `480p` 和 `720p`

* `prompt` 长度必须在 3 到 20,000 个字符之间。

* `image_urls` 用于图生视频模式，最多仅支持 2 张图片：
  索引 `0` 对应起始帧，索引 `1` 对应可选的结束帧。

* `image_urls` 支持 JPG、JPEG、PNG、WebP、GIF 和 AVIF 图片。每张图片应可公开访问，且不超过 30 MB。

* `image_urls` 与任何 `reference_*_urls` 字段互斥，不能在同一请求中同时使用。

* `reference_image_urls` 用于参考生视频模式，最多支持 9 张图片。支持的格式为 JPG、JPEG、PNG 和 WebP，每张图片不超过 30 MB。

* `reference_video_urls` 最多支持 3 个 MP4 或 MOV 文件。参考视频总时长应为 2 到 15 秒，视频总大小应小于 50 MB，每个视频应为 480p 到 720p。

* `reference_audio_urls` 最多支持 3 个 MP3 或 WAV 文件。参考音频总时长不应超过 15 秒，每个音频文件不超过 15 MB。音频参考需要至少一张参考图片或一个参考视频。

* 参考生视频模式下，`reference_image_urls`、`reference_video_urls` 和 `reference_audio_urls` 中的文件总数不得超过 12 个。

* 可在提示词中按顺序引用参考素材，例如 `@Image1`、`@Video1` 和 `@Audio1`。

* `aspect_ratio` 为可选。提供时，支持的值为 `auto`、`21:9`、`16:9`、`4:3`、`1:1`、`3:4`、`9:16`。

* `duration` 支持 `4` 到 `15` 的整数值。

* `resolution` 中的 `1080p` 和 `4k` 仅 `seedance-2` 支持。`seedance-2-fast` 仍仅限 `480p` 和 `720p`。

* 所有远程 URL 都应可公开访问并可直接下载。


## OpenAPI

````yaml zh/api-manual/video-series/seedance-2.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Seedance 2 API
  description: Seedance 2 API 根据文本、最多两张帧图，或图片、视频、音频参考生成 4–15 秒的视频。更快的变体仅支持 480p 和 720p。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Seedance 2
      summary: 提交 Seedance 2 视频生成任务
      description: 使用 Seedance 2 或 Seedance 2 Fast 生成视频，支持文生视频、首尾帧和多模态参考工作流。
      operationId: submitSeedance2Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              seedance-2-text-to-video:
                summary: Seedance 2 文生视频
                value:
                  model: seedance-2
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A cinematic drone shot flying over a neon city after rain,
                      reflections shimmering on the streets
                    aspect_ratio: '16:9'
                    resolution: 4k
                    duration: 5
                    generate_audio: true
              seedance-2-fast-text-to-video:
                summary: Seedance 2 Fast 文生视频
                value:
                  model: seedance-2-fast
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A fast-paced tracking shot through a cyberpunk alley with
                      glowing signs and drifting mist
                    aspect_ratio: '16:9'
                    resolution: 720p
                    duration: 5
                    generate_audio: true
              seedance-2-first-last-frame:
                summary: Seedance 2 首尾帧
                value:
                  model: seedance-2
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A smooth transition from sunrise to golden afternoon over
                      a mountain lake
                    image_urls:
                      - https://example.com/first-frame.jpg
                      - https://example.com/last-frame.jpg
                    aspect_ratio: '16:9'
                    resolution: 720p
                    duration: 10
                    generate_audio: false
              seedance-2-fast-multimodal-reference:
                summary: Seedance 2 Fast 多模态参考生视频
                value:
                  model: seedance-2-fast
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A stylish fashion short with energetic pacing, matching
                      the movement rhythm of the reference clip
                    reference_image_urls:
                      - https://example.com/reference-image.jpg
                    reference_video_urls:
                      - https://example.com/reference-video.mp4
                    reference_audio_urls:
                      - https://example.com/reference-audio.mp3
                    aspect_ratio: '9:16'
                    resolution: 720p
                    duration: 5
                    generate_audio: true
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          description: Seedance 2 模型标识。标准版使用 `seedance-2`，更快、成本更低的生成使用 `seedance-2-fast`。
          enum:
            - seedance-2
            - seedance-2-fast
        callback_url:
          type: string
          format: uri
          description: 接收结果通知的 Webhook 回调 URL
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
            - resolution
            - duration
          description: 生成参数
          properties:
            prompt:
              type: string
              description: 描述目标视频的文本提示词，长度须在 3 到 20,000 个字符之间。
              minLength: 3
              maxLength: 20000
              example: A cinematic drone shot flying over a neon city after rain
            image_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 2
              description: >-
                图生视频模式可选的首尾帧图片。提供 1 或 2 个公开可访问的图片 URL。索引 0 对应起始帧，索引 1
                对应可选的结束帧。支持的图片格式为 JPG、JPEG、PNG、WebP、GIF 和 AVIF；每张图片不超过 30
                MB。不能与任何 reference_*_urls 字段同时使用。
              example:
                - https://example.com/first-frame.jpg
                - https://example.com/last-frame.jpg
            reference_image_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 9
              description: >-
                多模态参考生视频模式可选的参考图片 URL。最多支持 9 张公开可访问的图片。支持的图片格式为 JPG、JPEG、PNG 和
                WebP；每张图片不超过 30 MB。可在提示词中按顺序引用图片，如 @Image1 或 @Image2。不能与
                image_urls 同时使用。
              example:
                - https://example.com/reference-image.jpg
            reference_video_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 3
              description: >-
                多模态参考生视频模式可选的参考视频 URL。最多支持 3 个公开可访问的 MP4 或 MOV 文件。参考视频总时长应为 2 到
                15 秒，总大小应小于 50 MB，每个视频分辨率应在 480p 到 720p 之间。可在提示词中按顺序引用视频，如
                @Video1 或 @Video2。不能与 image_urls 同时使用。
              example:
                - https://example.com/reference-video.mp4
            reference_audio_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 3
              description: >-
                多模态参考生视频模式可选的参考音频 URL。最多支持 3 个公开可访问的 MP3 或 WAV 文件。参考音频总时长不应超过 15
                秒，每个文件不超过 15 MB。使用音频参考时至少需要一张参考图片或一个参考视频。可在提示词中按顺序引用音频，如 @Audio1
                或 @Audio2。不能与 image_urls 同时使用。
              example:
                - https://example.com/reference-audio.mp3
            generate_audio:
              type: boolean
              description: 是否生成音轨。
              example: true
            resolution:
              type: string
              description: >-
                输出分辨率。`seedance-2` 支持 `480p`、`720p`、`1080p` 和
                `4k`。`seedance-2-fast` 仅支持 `480p` 和 `720p`。
              enum:
                - 480p
                - 720p
                - 1080p
                - 4k
              example: 4k
            aspect_ratio:
              type: string
              description: 可选的输出视频宽高比。
              enum:
                - auto
                - '1:1'
                - '21:9'
                - '4:3'
                - '3:4'
                - '16:9'
                - '9:16'
              example: auto
            duration:
              type: integer
              description: 视频时长（秒）。支持 4 到 15 的整数。
              example: 5
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
              description: 任务唯一标识，用于查询任务状态
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              example: not_started
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
              example: '2026-04-04T10:30:00'
              description: 任务创建时间，ISO 8601 格式
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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