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

# 创建视频

> Wan（通义万相）异步创建视频。

**路径：** `POST https://api.omniall.ai/v1/video/generations`

也可用 `POST /v1/videos`。创建后用 `id` / `task_id` 轮询查询。

当前仅支持（阿里巴巴 Wan）：`wan2.1-480P`、`wan2.1-720P`、`wan2.1-1080P`（见[模型广场](https://omniall.ai/pricing)）。

鉴权：`Authorization: Bearer sk-...`



## OpenAPI

````yaml zh-CN/openapi/wan-video.yaml POST /v1/video/generations
openapi: 3.1.0
info:
  title: Omniall AI — Wan视频
  version: 1.0.0
  description: >-
    Wan（通义万相）异步创建视频。


    **路径：** `POST https://api.omniall.ai/v1/video/generations`


    也可用 `POST /v1/videos`。创建后用 `id` / `task_id` 轮询查询。


    当前仅支持（阿里巴巴
    Wan）：`wan2.1-480P`、`wan2.1-720P`、`wan2.1-1080P`（见[模型广场](https://omniall.ai/pricing)）。


    鉴权：`Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/video/generations:
    post:
      tags:
        - Wan
      summary: 创建视频
      description: >-
        Wan（通义万相）异步创建视频。


        **路径：** `POST https://api.omniall.ai/v1/video/generations`


        也可用 `POST /v1/videos`。创建后用 `id` / `task_id` 轮询查询。


        当前仅支持（阿里巴巴
        Wan）：`wan2.1-480P`、`wan2.1-720P`、`wan2.1-1080P`（见[模型广场](https://omniall.ai/pricing)）。


        鉴权：`Authorization: Bearer sk-...`
      operationId: wanCreateVideo
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API Key，例如 `Bearer sk-...`。
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              description: Wan / 通义万相视频异步创建请求。
              properties:
                model:
                  type: string
                  description: >-
                    视频模型 ID。当前仅支持（阿里巴巴
                    Wan）：`wan2.1-480P`、`wan2.1-720P`、`wan2.1-1080P`（见[模型广场](https://omniall.ai/pricing)）。
                  example: wan2.1-720P
                prompt:
                  type: string
                  description: 视频描述文本。写清主体、场景、镜头与风格。
                  example: 电影感城市夜景，镜头沿湿润街道缓慢向前，霓虹倒映在路面
                duration:
                  type: integer
                  description: 时长（秒）。也可用字符串 `seconds`。
                  example: 10
                seconds:
                  type: string
                  description: '`duration` 的字符串写法。'
                ratio:
                  type: string
                  enum:
                    - '21:9'
                    - '16:9'
                    - '4:3'
                    - '1:1'
                    - '3:4'
                    - '9:16'
                  description: 画幅比例。也兼容 `size` / `aspect_ratio`。
                  example: '16:9'
                size:
                  type: string
                  description: 画幅或像素尺寸别名（如 `16:9` 或 `1280*720`，视模型而定）。
                aspect_ratio:
                  type: string
                  description: '`ratio` 别名。'
                images:
                  type: array
                  items:
                    type: string
                  description: 多图参考 URL 列表。有首/尾帧时勿混用。
                image:
                  type: string
                  description: 单张参考图 / 首帧。
                first_frame:
                  description: 首帧图 URL（字符串或数组）。别名：`start_frame`、`first_frame_url`。
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                last_frame:
                  description: 尾帧图 URL（字符串或数组）。别名：`end_frame`、`last_frame_url`。
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                start_frame:
                  description: '`first_frame` 别名。'
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                end_frame:
                  description: '`last_frame` 别名。'
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                reference_images:
                  type: array
                  items:
                    type: string
                  description: 参考图 URL。
                reference_videos:
                  type: array
                  items:
                    type: string
                  description: 参考视频 URL。
                reference_audios:
                  type: array
                  items:
                    type: string
                  description: 参考音频 URL。
                generate_audio:
                  type: boolean
                  description: 是否生成/输出音频轨。
                  example: true
                content:
                  type: array
                  description: 多模态 content 写法。
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - text
                          - image_url
                          - video_url
                          - audio_url
                      text:
                        type: string
                      url:
                        type: string
                      role:
                        type: string
                        description: >-
                          `first_frame` / `last_frame` / `reference_image` /
                          `reference_video` / `reference_audio`
                      image_url:
                        type: object
                        additionalProperties: true
                      video_url:
                        type: object
                        additionalProperties: true
                      audio_url:
                        type: object
                        additionalProperties: true
            examples:
              文生视频:
                summary: 文生视频
                value:
                  model: wan2.1-720P
                  prompt: 电影感城市夜景，镜头沿湿润街道缓慢向前，霓虹倒映在路面
                  duration: 10
                  ratio: '16:9'
                  generate_audio: true
              多图参考:
                summary: 多图参考
                value:
                  model: wan2.1-720P
                  prompt: 参考这些图片的角色外观与服装，生成一段角色转身走动的镜头
                  duration: 5
                  ratio: '16:9'
                  images:
                    - https://example.com/character-front.jpg
                    - https://example.com/character-side.jpg
                  generate_audio: true
              全能参考多模态:
                summary: 全能参考多模态
                value:
                  model: wan2.1-1080P
                  prompt: 保持产品外观一致，镜头运动参考视频，节奏对齐音频
                  duration: 8
                  ratio: '16:9'
                  reference_images:
                    - https://example.com/product.png
                  reference_videos:
                    - https://example.com/motion-guide.mp4
                  reference_audios:
                    - https://example.com/music-guide.mp3
                  generate_audio: true
              首尾帧:
                summary: 首尾帧
                value:
                  model: wan2.1-720P
                  prompt: 从清晨到黄昏，云层缓慢流动，光线自然过渡
                  duration: 5
                  ratio: '16:9'
                  first_frame: https://example.com/morning.png
                  last_frame: https://example.com/dusk.png
              首尾帧写法2:
                summary: 首尾帧 · 写法2（数组）
                value:
                  model: wan2.1-720P
                  prompt: 从清晨到黄昏，云层缓慢流动
                  duration: 5
                  ratio: '16:9'
                  start_frame:
                    - https://example.com/morning.png
                  end_frame:
                    - https://example.com/dusk.png
              首尾帧写法3:
                summary: 首尾帧 · 写法3（content）
                value:
                  model: wan2.1-720P
                  prompt: 云层流动，光线过渡
                  duration: 5
                  ratio: '16:9'
                  content:
                    - type: image_url
                      url: https://example.com/morning.png
                      role: first_frame
                    - type: image_url
                      url: https://example.com/dusk.png
                      role: last_frame
      responses:
        '200':
          description: 任务已接受
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  task_id:
                    type: string
                  status:
                    type: string
                  created_at:
                    type: integer
              example:
                id: task_xxx
                task_id: task_xxx
                status: submitted
        '400':
          description: 请求无效
        '401':
          description: 未授权

````

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