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

# Seedance 2.5

> 文生视频、首尾帧、多模态参考和视频编辑。



## OpenAPI

````yaml zh/openapi/videos/seedance-2-5.yaml POST /v1/videos/generate
openapi: 3.1.0
info:
  title: Seedance 2.5
  version: '1.0'
  description: 文生视频、首尾帧、多模态参考和视频编辑。
servers:
  - url: https://openapi.imini.ai/imini/router
security:
  - ApiKeyAuth: []
paths:
  /v1/videos/generate:
    post:
      summary: Seedance 2.5
      description: >
        - 关键帧：传 `first_frame`，可选 `last_frame`；不与普通参考混用。

        - 编辑：传一段 `edit_source`，可追加 `asset` 素材。编辑源计入视频数量上限。

        - 输入视频：普通参考每段 2–30 秒，编辑每段 4–30 秒，逐段四舍五入后合计不超过 30 秒。


        提交后[查询任务状态](/zh/api-reference/videos/task-query)。参见[模型价格](/zh/guide/pricing)。
      operationId: generateSeedance25
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  const: seedance2.5
                prompt:
                  type: string
                  minLength: 1
                  maxLength: 15000
                  description: 视频提示词。
                resolution:
                  type: string
                  enum:
                    - 480P
                    - 720P
                    - 1080P
                  default: 720P
                  description: 输出分辨率。
                duration:
                  oneOf:
                    - type: integer
                      minimum: 4
                      maximum: 30
                    - type: integer
                      const: -1
                  description: 生成 4–30 秒，默认 4 秒。编辑须省略或传 `-1`，跟随原片。
                aspect_ratio:
                  type: string
                  enum:
                    - adaptive
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                    - '21:9'
                  default: adaptive
                  description: 编辑时省略或传 `adaptive`，跟随原片。
                reference_images:
                  type: array
                  maxItems: 30
                  description: 参考图或关键帧。
                  items:
                    type: object
                    required:
                      - url
                    properties:
                      url:
                        type: string
                        description: 公网图片 URL 或 Base64 Data URI（解码后最多 20 MiB）。
                      reference_type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - asset
                          - first_frame
                          - last_frame
                          - null
                        default: asset
                        description: '`null` 等同于 `asset`。'
                reference_videos:
                  type: array
                  maxItems: 10
                  description: 参考视频或编辑源。
                  items:
                    type: object
                    required:
                      - url
                    properties:
                      url:
                        type: string
                        description: 公网 HTTP(S) 视频 URL。
                      reference_type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - asset
                          - edit_source
                          - null
                        default: asset
                        description: 编辑源须显式标为 `edit_source`。
                reference_audios:
                  type: array
                  maxItems: 10
                  description: 支持纯音频参考。
                  items:
                    type: object
                    required:
                      - url
                    properties:
                      url:
                        type: string
                        description: 公网音频 URL 或 Base64 Data URI（解码后最多 15 MiB）。
                      reference_type:
                        type:
                          - string
                          - 'null'
                        enum:
                          - asset
                          - null
                        default: asset
                        description: 普通音频参考。
                generate_audio:
                  type: boolean
                  default: true
                  description: 不支持关闭。
                  const: true
            examples:
              text:
                summary: 文生视频
                value:
                  model: seedance2.5
                  resolution: 720P
                  duration: 4
                  prompt: 晨雾中的海湾，镜头缓慢向前移动。
                  aspect_ratio: '16:9'
              first_frame:
                summary: 首帧生成
                value:
                  model: seedance2.5
                  resolution: 720P
                  duration: 4
                  prompt: 让云朵缓慢飘过，镜头保持稳定。
                  reference_images:
                    - url: https://example.com/first.png
                      reference_type: first_frame
              first_last:
                summary: 首尾帧生成
                value:
                  model: seedance2.5
                  resolution: 720P
                  duration: 4
                  prompt: 平滑地从第一帧过渡到最后一帧。
                  reference_images:
                    - url: https://example.com/first.png
                      reference_type: first_frame
                    - url: https://example.com/last.png
                      reference_type: last_frame
              reference:
                summary: 组合参考
                value:
                  model: seedance2.5
                  resolution: 720P
                  duration: 4
                  prompt: 参考图片中的构图，并参考视频中的镜头运动。
                  reference_images:
                    - url: https://example.com/reference.png
                      reference_type: asset
                  reference_videos:
                    - url: https://example.com/motion.mp4
                      reference_type: asset
                  reference_audios:
                    - url: https://example.com/audio.mp3
                      reference_type: asset
              edit:
                summary: 编辑原视频
                value:
                  model: seedance2.5
                  resolution: 720P
                  prompt: 保留原镜头，将视频中的天气改成晴天。
                  reference_videos:
                    - url: https://example.com/source.mp4
                      reference_type: edit_source
      responses:
        '200':
          description: 任务已受理。
          content:
            application/json:
              schema:
                type: object
                required:
                  - task_id
                  - model
                  - created_at
                  - request_id
                properties:
                  task_id:
                    type: string
                    description: 任务 ID，用于轮询。
                  model:
                    type: string
                    description: 回显请求中的模型 ID。
                  created_at:
                    type: string
                    format: date-time
                    description: 任务创建时间（UTC）。
                  request_id:
                    type: string
                    description: 请求 ID。
              example:
                task_id: task_2041350318103396352
                model: seedance2.5
                created_at: '2026-11-16T07:00:00.000Z'
                request_id: task_2041350318103396352
        '400':
          description: 模型或请求参数无效。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: INVALID_PARAMETER
                  message: Parameter value is out of range or has incorrect type
                  status: 400
                  request_id: req_example
        '402':
          description: 积分不足。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: INSUFFICIENT_CREDITS
                  message: >-
                    Insufficient credits. Upgrade your plan or purchase
                    additional credits.
                  status: 402
                  request_id: req_example
        '413':
          description: 请求体或 Base64 素材超出大小限制。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: PAYLOAD_TOO_LARGE
                  message: Request payload exceeds the supported size
                  status: 413
                  request_id: req_example
components:
  schemas:
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            request_id:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: '`Bearer YOUR_API_KEY`。在 [API Keys](https://imini.ai/zh/api-keys) 管理密钥。'

````

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