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

# Wan 2.7 Text to Video

> Submit an asynchronous Ali `wan2.7-t2v` text-to-video task.

After submitting a task, query its status via `GET /ali/api/v1/tasks/{task_id}`.



## OpenAPI

````yaml api-reference/en/zmodelVideo/ali/api/wan2.7-t2v.json POST /ali/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.0.1
info:
  title: Wan 2.7 Text to Video
  version: 1.0.0
  description: >-
    Aliyun Wan `wan2.7-t2v` text-to-video capability documentation. The unified
    API endpoint is
    `/ali/api/v1/services/aigc/video-generation/video-synthesis`, used to create
    asynchronous video generation tasks.
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API server endpoint
security: []
tags:
  - name: Wan 2.7 Video
    description: Ali wan2.7-t2v text-to-video capability
paths:
  /ali/api/v1/services/aigc/video-generation/video-synthesis:
    post:
      tags:
        - Wan 2.7 Video
      summary: Create wan2.7-t2v text-to-video task
      description: >-
        Submit an asynchronous Ali `wan2.7-t2v` text-to-video task.


        After submitting a task, query its status via `GET
        /ali/api/v1/tasks/{task_id}`.
      operationId: aliWan27T2VCreate
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
          description: >-
            Request content type. This parameter must be set to
            application/json.
        - name: X-DashScope-Async
          in: header
          required: true
          schema:
            type: string
          description: >-
            Asynchronous processing configuration parameter. HTTP requests only
            support async mode and must be set to enable.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan27T2VRequest'
            examples:
              narrative:
                summary: Multi-shot narrative
                value:
                  model: wan2.7-t2v
                  input:
                    prompt: >-
                      一段紧张刺激的侦探追查故事，展现电影级叙事能力。第1个镜头[0-3秒]
                      全景：雨夜的纽约街头，霓虹灯闪烁，一位身穿黑色风衣的侦探快步行走。 第2个镜头[3-6秒]
                      中景：侦探进入一栋老旧建筑，雨水打湿了他的外套，门在他身后缓缓关闭。 第3个镜头[6-9秒]
                      特写：侦探的眼神坚毅专注，远处传来警笛声，他微微皱眉思考。 第4个镜头[9-12秒]
                      中景：侦探在昏暗走廊中小心前行，手电筒照亮前方。 第5个镜头[12-15秒]
                      特写：侦探发现关键线索，脸上露出恍然大悟的表情。
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    prompt_extend: true
                    watermark: true
                    duration: 15
              with_audio:
                summary: With audio file
                value:
                  model: wan2.7-t2v
                  input:
                    prompt: >-
                      A cute cartoon cat general in exquisitely detailed golden
                      armor and an oversized helmet bravely stands on a cliff.
                      He rides a small but valiant warhorse, reciting ancient
                      poetry in a childlike voice. Below the cliff, a vast army
                      of mice charges with makeshift weapons. A dramatic battle
                      scene inspired by Chinese war epics. Storm clouds gather
                      above distant snowy peaks.
                    audio_url: >-
                      https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250923/hbiayh/%E4%BB%8E%E5%86%9B%E8%A1%8C.mp3
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    prompt_extend: true
                    duration: 10
              auto_dub:
                summary: Auto dubbing
                value:
                  model: wan2.7-t2v
                  input:
                    prompt: >-
                      A cute cartoon cat general in exquisitely detailed golden
                      armor and an oversized helmet bravely stands on a cliff.
                      He rides a small but valiant warhorse, reciting ancient
                      poetry in a childlike voice. Below the cliff, a vast army
                      of mice charges with makeshift weapons. A dramatic battle
                      scene inspired by Chinese war epics. Storm clouds gather
                      above distant snowy peaks.
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
                    prompt_extend: true
                    duration: 10
              with_negative_prompt:
                summary: With negative prompt
                value:
                  model: wan2.7-t2v
                  input:
                    prompt: A little cat running in the moonlight
                    negative_prompt: flowers
                  parameters:
                    resolution: 720P
                    ratio: '16:9'
      responses:
        '200':
          description: Submitted successfully. Returns a video task object.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
              example:
                output:
                  task_status: PENDING
                  task_id: 0385dc79-5ff8-4d82-bcb6-xxxxxx
                request_id: 4909100c-7b5a-9f92-bfe5-xxxxxx
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication failed, e.g. missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit triggered or insufficient account quota.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An internal error occurred while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    Wan27T2VRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          enum:
            - wan2.7-t2v
          description: Model name.
        input:
          $ref: '#/components/schemas/Wan27T2VInput'
        parameters:
          $ref: '#/components/schemas/Wan27T2VParameters'
    VideoTaskResponse:
      type: object
      properties:
        output:
          type: object
          properties:
            task_id:
              type: string
              description: Task ID. Valid for 24 hours for querying.
            task_status:
              type: string
              description: |-
                Task status.

                Enum values

                PENDING: Task queued

                RUNNING: Task processing

                SUCCEEDED: Task completed successfully

                FAILED: Task failed

                CANCELED: Task canceled

                UNKNOWN: Task does not exist or status unknown
        request_id:
          type: string
          description: >-
            Unique request ID. Can be used for request tracing and issue
            diagnosis.
        code:
          type: string
          description: >-
            Error code. Only returned when the request fails. See error codes
            for details.
        message:
          type: string
          description: >-
            Error message. Only returned when the request fails. See error codes
            for details.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message.
        request_id:
          type: string
          description: Request ID.
    Wan27T2VInput:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          description: >-
            Text prompt describing the desired video content and visual
            characteristics. Supports Chinese and English, each character or
            letter counts as one. Excess characters will be automatically
            truncated. Character limit varies by model version:

            - `wan2.7-t2v`: up to 5000 characters.
          maxLength: 5000
        negative_prompt:
          type: string
          description: >-
            Negative prompt describing content you do not want in the video,
            used to constrain the video output. Supports Chinese and English, up
            to 500 characters. Excess characters will be automatically
            truncated. Example: `low resolution, worst quality, deformed, extra
            fingers, bad proportions`.
          maxLength: 500
        audio_url:
          type: string
          description: >-
            Audio file URL. The model will use this audio to generate the video.


            Supported input formats:

            - Public URL: HTTP or HTTPS protocol, e.g.
            `https://help-static-aliyun-doc.aliyuncs.com/xxx.mp3`.

            - Temporary URL: OSS protocol, obtained via file upload, e.g.
            `oss://dashscope-instant/xxx/xxx.mp3`.


            Audio constraints:

            - Formats: `wav`, `mp3`.

            - Duration: 2~30s.

            - File size: up to 15MB.

            - Truncation: if audio exceeds the `duration` value (e.g. 5s), the
            first 5s is used and the rest discarded. If audio is shorter than
            the video duration, the portion beyond audio length is silent. For
            example, 3s audio with 5s video: first 3s has sound, last 2s is
            silent.
    Wan27T2VParameters:
      type: object
      properties:
        resolution:
          type: string
          enum:
            - 720P
            - 1080P
          description: >-
            Important: `resolution` directly affects cost. Confirm the model
            pricing before calling.


            Specifies the output video resolution tier, controlling video
            clarity (total pixels).


            `wan2.7-t2v`: Available values: `720P`, `1080P`. Default: `1080P`.
          default: 1080P
        ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
          description: >-
            Video aspect ratio.

            - `16:9` (default)

            - `9:16`

            - `1:1`

            - `4:3`

            - `3:4`


            Output video resolution (width x height) for each ratio and
            resolution tier:


            **720P:**

            - `16:9` → 1280*720

            - `9:16` → 720*1280

            - `1:1` → 960*960

            - `4:3` → 1104*832

            - `3:4` → 832*1104


            **1080P:**

            - `16:9` → 1920*1080

            - `9:16` → 1080*1920

            - `1:1` → 1440*1440

            - `4:3` → 1648*1248

            - `3:4` → 1248*1648
          default: '16:9'
        duration:
          type: integer
          description: >-
            Important: `duration` directly affects cost, billed per second.
            Confirm the model pricing before calling.


            Video duration in seconds.

            - `wan2.7-t2v`: range [2, 15]. Default: 5.
          minimum: 2
          maximum: 15
          default: 5
        prompt_extend:
          type: boolean
          description: >-
            Whether to enable intelligent prompt rewriting. When enabled, a
            large language model rewrites the input prompt intelligently,
            significantly improving results for short prompts but increasing
            processing time. `true` (default): enable. `false`: disable.
          default: true
        watermark:
          type: boolean
          description: >-
            Whether to add a watermark. The watermark is positioned at the
            bottom-right corner with the text 'AI生成'. `false` (default): no
            watermark. `true`: add watermark.
          default: false
        seed:
          type: integer
          description: >-
            Random seed, range [0, 2147483647]. When unspecified, the system
            auto-generates a random seed. For better reproducibility, set a
            fixed seed. Note: due to the probabilistic nature of model
            generation, the same seed does not guarantee identical results every
            time.
          minimum: 0
          maximum: 2147483647
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````