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

# Wan 2.5 图生视频

> Wan 2.5 API 将一张参考图片生成 5 或 10 秒的视频，支持同步音频，输出最高 1080p。

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

使用 Wan 2.5 图生视频将一张参考图片生成 5 或 10 秒的视频，支持同步音频，输出最高 1080p。

## 模型

* `alibaba/wan-2.5/image-to-video`：根据运动提示词让参考图片动起来。

## 请求参数

`model` 和可选的 `callback_url` 放在请求根级，下列生成参数放在 `input` 内。

### prompt

* `prompt`（string，必填）：描述主体、场景和运动。去除首尾空白后为 1–1500 个字符。

### image\_urls

* `image_urls`（string\[]，必填）：只能提供一个可公开访问的 HTTP(S) 图片 URL。

### resolution

* `resolution`（string，可选）：输出分辨率：480p、720p 或 1080p。默认：720p。

### duration

* `duration`（integer，可选）：视频时长：5 或 10 秒。默认：5。

### audio

* `audio`（string，可选）：可选的音频文件 URL，为视频提供一段录音。

### negative\_prompt

* `negative_prompt`（string，可选）：可选，描述场景中要排除的元素。

### seed

* `seed`（integer，可选）：可选的整数随机种子，用于复用生成设置。

## 获取视频

使用 `task_id` 查询任务。`status` 为 `not_started` 或 `running` 时继续轮询。状态为 `finished` 时，从 `data.files[].file_url` 读取视频 URL；状态为 `failed` 时，从 `data.error_message` 读取错误详情。


## OpenAPI

````yaml zh/api-manual/video-series/alibaba-wan-2-5-image-to-video.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Wan 2.5 图生视频
  description: 使用 Wan 2.5 将参考图片生成 5 或 10 秒的视频，支持音频输入，视频输出最高 1080p。
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Video Series
      summary: 提交 Wan 2.5 图生视频任务
      description: |-
        只发送本工作流列出的字段。包含其他工作流参数的请求会在扣除积分前被拒绝。

        如果提供 prompt，则不能为空。输入 URL 字段必须是带主机名、不含内嵌凭证的 HTTP(S) URL。

        duration 可设为 5 或 10 秒。省略时默认 5 秒。
      operationId: submit_alibaba_wan_2_5_image_to_video
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              additionalProperties: true
              properties:
                model:
                  type: string
                  example: alibaba/wan-2.5/image-to-video
                input:
                  type: object
                  required:
                    - image_urls
                    - prompt
                  properties:
                    prompt:
                      type: string
                      maxLength: 1500
                      minLength: 1
                      description: 描述主体、场景和运动。去除首尾空白后为 1–1500 个字符。
                    image_urls:
                      type: array
                      items:
                        type: string
                        format: uri
                        description: 可公开访问的 HTTP(S) 图片 URL。
                      minItems: 1
                      maxItems: 1
                      description: 只能提供一个可公开访问的 HTTP(S) 图片 URL。
                    resolution:
                      type: string
                      enum:
                        - 480p
                        - 720p
                        - 1080p
                      default: 720p
                      description: 输出分辨率：480p、720p 或 1080p。默认：720p。
                    duration:
                      type: integer
                      enum:
                        - 5
                        - 10
                      default: 5
                      description: 视频时长：5 或 10 秒。默认：5。
                    audio:
                      type: string
                      description: 可选的音频文件 URL，为视频提供一段录音。
                      example: https://example.com/audio.mp3
                    negative_prompt:
                      type: string
                      description: 可选，描述场景中要排除的元素。
                    seed:
                      type: integer
                      description: 可选的整数随机种子，用于复用生成设置。
                  additionalProperties: false
                callback_url:
                  type: string
                  nullable: true
                  description: >-
                    可选的公开 HTTP(S) 地址，用于接收任务完成通知。建议使用 HTTPS。省略、设为 null
                    或空字符串即不发送回调。
              description: model 和可选的 callback_url 放在请求根级，生成参数放在 input 内。
            examples:
              basic:
                summary: 基础工作流
                value:
                  model: alibaba/wan-2.5/image-to-video
                  input:
                    image_urls:
                      - https://example.com/image.png
                    prompt: >-
                      A quiet forest under soft morning light, with natural
                      detail.
                    resolution: 720p
                    duration: 5
              callback:
                summary: 10 秒视频并接收完成回调
                value:
                  model: alibaba/wan-2.5/image-to-video
                  input:
                    image_urls:
                      - https://example.com/image.png
                    prompt: >-
                      A quiet forest under soft morning light, with natural
                      detail.
                    resolution: 720p
                    duration: 10
                  callback_url: https://your-domain.com/callback
      responses:
        '200':
          description: 任务已提交
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - data
                properties:
                  code:
                    type: integer
                    enum:
                      - 200
                  data:
                    type: object
                    required:
                      - task_id
                      - status
                      - created_time
                    properties:
                      task_id:
                        type: string
                      status:
                        type: string
                        enum:
                          - not_started
                          - running
                          - finished
                          - failed
                      created_time:
                        type: string
                        format: date-time
              example:
                code: 200
                data:
                  task_id: task-unified-example
                  status: running
                  created_time: '2026-09-10T08:00:00'
        '400':
          description: 输入校验、媒体访问或账户余额错误
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '401':
          description: 凭证无效
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '403':
          description: 拒绝访问
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '404':
          description: 模型不存在或已停用
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '408':
          description: 请求超时
          content:
            text/plain:
              schema:
                type: string
              example: Request timeout
        '422':
          description: JSON 无效或请求体不是对象
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '429':
          description: 超出频率限制或 API Key 积分限额
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '500':
          description: 内部错误
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '502':
          description: 生成任务创建错误
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
        '503':
          description: 所请求的模型暂时不可用
          content:
            application/json:
              schema:
                type: object
                required:
                  - detail
                properties:
                  detail:
                    oneOf:
                      - type: string
                      - type: object
                        additionalProperties: true
                      - type: array
                        items: {}
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 使用 VIDGO_API_KEY。

````

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