> ## 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.5

> Seedance 2.5 API 可根据文本、首尾帧，或图片、视频和音频参考生成 4–30 秒、480p、720p 或 1080p 的视频。

> [!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.5` 进行文生视频、首尾帧生成和多模态参考生视频。

## 输入模式

* 文生视频时不传媒体字段。
* 使用 `image_urls` 传入一张起始帧和可选的结束帧。
* 使用 `reference_image_urls`、`reference_video_urls` 和 `reference_audio_urls` 传入多模态参考。在提示词中以 `@Image1`、`@Video1` 或 `@Audio1` 引用它们。

## 注意事项

* `prompt`、`duration` 和 `resolution` 为必填。
* `duration` 接受 4 到 30 秒的整数值。
* `resolution` 接受 `480p`、`720p` 或 `1080p`。
* `image_urls` 最多接受两张图片，不能与参考媒体同时使用，并使用 `aspect_ratio: auto`。
* 参考模式最多接受 30 张图片、10 个视频和 10 个音频文件，总计最多 50 个文件。
* 音频参考需要至少一张参考图片或一个参考视频。
* `aspect_ratio` 接受 `auto`、`21:9`、`16:9`、`4:3`、`1:1`、`3:4` 或 `9:16`。
* 所有媒体 URL 都必须可公开访问并可直接下载。


## OpenAPI

````yaml zh/api-manual/video-series/seedance-2.5.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Seedance 2.5 API
  description: Seedance 2.5 API 根据文本、首尾帧，或图片、视频、音频参考生成 4–30 秒的 480p、720p 或 1080p 视频。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Seedance 2.5
      summary: 提交 Seedance 2.5 视频任务
      operationId: submitSeedance25Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                value:
                  model: seedance-2.5
                  input:
                    prompt: A cinematic aerial view of a city at night
                    duration: 5
                    resolution: 1080p
                    aspect_ratio: '16:9'
                    generate_audio: true
              first-last-frame:
                value:
                  model: seedance-2.5
                  input:
                    prompt: Transition smoothly between the two frames
                    image_urls:
                      - https://example.com/first.jpg
                      - https://example.com/last.jpg
                    duration: 5
                    resolution: 720p
              reference-to-video:
                value:
                  model: seedance-2.5
                  input:
                    prompt: Use @Video1 for motion and @Audio1 for rhythm
                    reference_video_urls:
                      - https://example.com/reference.mp4
                    reference_audio_urls:
                      - https://example.com/reference.wav
                    duration: 5
                    resolution: 480p
      responses:
        '200':
          description: 任务提交成功
        '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
        - input
      properties:
        model:
          type: string
          enum:
            - seedance-2.5
        callback_url:
          type: string
          format: uri
        input:
          type: object
          additionalProperties: false
          required:
            - prompt
            - duration
            - resolution
          properties:
            prompt:
              type: string
              minLength: 1
            image_urls:
              type: array
              maxItems: 2
              items:
                type: string
                format: uri
            reference_image_urls:
              type: array
              maxItems: 30
              items:
                type: string
                format: uri
            reference_video_urls:
              type: array
              maxItems: 10
              items:
                type: string
                format: uri
            reference_audio_urls:
              type: array
              maxItems: 10
              items:
                type: string
                format: uri
            resolution:
              type: string
              enum:
                - 480p
                - 720p
                - 1080p
            duration:
              type: integer
              minimum: 4
              maximum: 30
            aspect_ratio:
              type: string
              enum:
                - auto
                - '21:9'
                - '16:9'
                - '4:3'
                - '1:1'
                - '3:4'
                - '9:16'
            generate_audio:
              type: boolean
    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.