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

# Wan 2.5 Text-To-Video Preview Generation

> Generate videos from text prompts using the wan2.5-t2v-preview model.

<Note>
  This API supports Alibaba Tongyi Wanxiang (Wan2) video generation models. Please refer to Alibaba Cloud's [official documentation](https://www.alibabacloud.com/help/en/model-studio/text-to-video-api-reference) for more details.
</Note>

## Overview

Generate videos from text prompts using the wan2.5-t2v-preview model with optional audio generation.

## Key Features

* Text-to-video generation with auto sound or custom audio
* Multiple resolution options (480P/720P/1080P)
* 5s or 10s duration
* 24fps output

## Resolution Options

### 480P

* 832×480 (16:9)
* 480×832 (9:16)
* 624×624 (1:1)

### 720P

* 1280×720 (16:9)
* 720×1280 (9:16)
* 960×960 (1:1)
* 1088×832 (4:3)
* 832×1088 (3:4)

### 1080P

* 1920×1080 (16:9)
* 1080×1920 (9:16)
* 1440×1440 (1:1)
* 1632×1248 (4:3)
* 1248×1632 (3:4)

## Audio Features

### Auto-generated Audio

* Enabled by default
* Automatically generates synchronized audio based on video content

### Custom Audio

* Supported formats: WAV, MP3
* Duration: 3-30 seconds
* Max file size: 15MB
* **Behavior**: If audio is shorter than video, remaining portion is silent; if longer, it's truncated

## Example Requests

### Basic Text-to-Video

```json theme={null}
{
  "prompt": "A small cat running on a grassy field in the moonlight",
  "size": "1920*1080",
  "duration": 10,
  "audio": true
}
```

### With Custom Audio

```json theme={null}
{
  "prompt": "A person walking through a forest, birds chirping",
  "audio_url": "https://example.com/forest_sounds.mp3",
  "size": "1920*1080",
  "duration": 10
}
```

### Silent Video

```json theme={null}
{
  "prompt": "City night scene timelapse, flowing traffic, brilliant lights",
  "size": "1280*720",
  "duration": 5,
  "audio": false
}
```

## Prompt Tips

For best results when describing motion:

* Specify camera movement (pan left, zoom in, dolly shot)
* Describe subject motion (walks forward, turns around)
* Include environment details (windy, foggy, sunlit)


## OpenAPI

````yaml api-reference/endpoint/alibaba/wan2.5-t2v-preview/wan2.5-t2v-preview.yaml POST /vendors/alibaba/v1/wan2.5-t2v-preview/generation
openapi: 3.1.0
info:
  title: Wan2.5-t2v-preview API
  description: Wan2.5 Text-to-Video Preview Model API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.mulerouter.ai/
security:
  - bearerAuth: []
paths:
  /vendors/alibaba/v1/wan2.5-t2v-preview/generation:
    post:
      summary: Create Generation Task
      description: Generate videos from text prompts using the wan2.5-t2v-preview model.
      operationId: wan25_t2v_preview_generation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan25T2VPreviewRequest'
        required: true
      responses:
        '202':
          description: Accepted - Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCreatedResponse'
components:
  schemas:
    Wan25T2VPreviewRequest:
      type: object
      additionalProperties: false
      properties:
        prompt:
          type: string
          description: >-
            Text description for the desired video content (max 2000
            characters).
          maxLength: 2000
        negative_prompt:
          anyOf:
            - type: string
            - type: 'null'
          description: Negative prompt describing unwanted content (max 500 characters).
          maxLength: 500
        audio:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Enable automatic audio generation. Set to false to force a silent
            output.
          default: true
        audio_url:
          anyOf:
            - type: string
              format: uri
            - type: 'null'
          description: >-
            Custom audio file URL (wav/mp3, 3-30s, ≤15MB). Overrides the audio
            flag.
        size:
          type: string
          description: >-
            Output resolution ("width\*height"). Supported tiers:

            - 480P: 832\*480 (16:9), 480\*832 (9:16), 624\*624 (1:1)

            - 720P: 1280\*720 (16:9), 720\*1280 (9:16), 960\*960 (1:1),
            1088\*832 (4:3), 832\*1088 (3:4)

            - 1080P: 1920\*1080 (16:9), 1080\*1920 (9:16), 1440\*1440 (1:1),
            1632\*1248 (4:3), 1248\*1632 (3:4)
          enum:
            - 832*480
            - 480*832
            - 624*624
            - 1280*720
            - 720*1280
            - 960*960
            - 1088*832
            - 832*1088
            - 1920*1080
            - 1080*1920
            - 1440*1440
            - 1632*1248
            - 1248*1632
          default: 1280*720
        duration:
          type: integer
          description: Video duration in seconds (24 fps). Supported values 5 or 10.
          enum:
            - 5
            - 10
        prompt_extend:
          type: boolean
          description: >-
            Enable intelligent prompt rewriting (slightly longer latency, better
            detail).
          default: true
        seed:
          type: integer
          description: Random seed [0, 2147483647].
          minimum: 0
          maximum: 2147483647
        safety_filter:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Enable content safety filter. Defaults to true. Set to false to
            disable content safety inspection.
          default: true
      required:
        - prompt
    TaskCreatedResponse:
      type: object
      additionalProperties: true
      properties:
        task_info:
          $ref: '#/components/schemas/TaskInfoCreated'
    TaskInfoCreated:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: UUID of the task
          format: uuid
        status:
          type: string
          description: Task status (pending when created)
          enum:
            - pending
        created_at:
          type: string
          description: Task creation timestamp (ISO 8601)
          format: date-time
        updated_at:
          type: string
          description: Task last update timestamp (ISO 8601)
          format: date-time
      required:
        - id
        - status
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````