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

# Wan2.7 Text to Video

> - WAN2.7 (wan2.7-text-to-video) model supports text-to-video generation, producing fluent videos from textual prompts
- **Multi-shot narrative:** Control shot structure via natural language in `prompt`
  - Single shot: state "generate a single-shot video" in the prompt
  - Multi shot: use "generate a multi-shot video" or timestamped shot lists (e.g. "Shot 1 [0-3s] wide angle: rainy night street")
  - Default: when unspecified, the model interprets `prompt` content on its own
- **Audio handling:**
  - With `audio_urls`: the model uses the provided audio as the driving source
  - Without `audio_urls`: the model auto-generates background music or sound effects matching the visual content
- Asynchronous processing mode, use the returned task ID to [query status](/en/api-manual/task-management/get-task-detail)
- Generated video links are valid for 24 hours, please save them promptly



## OpenAPI

````yaml /en/api-manual/video-series/wan2.7/wan2.7-text-to-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: wan2.7-text-to-video API
  description: >-
    Generate videos from text using the WAN2.7 model with simplified model
    parameter configuration
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: Production Environment
security:
  - bearerAuth: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - Video Generation
      summary: wan2.7-text-to-video API
      description: >-
        - WAN2.7 (wan2.7-text-to-video) model supports text-to-video generation,
        producing fluent videos from textual prompts

        - **Multi-shot narrative:** Control shot structure via natural language
        in `prompt`
          - Single shot: state "generate a single-shot video" in the prompt
          - Multi shot: use "generate a multi-shot video" or timestamped shot lists (e.g. "Shot 1 [0-3s] wide angle: rainy night street")
          - Default: when unspecified, the model interprets `prompt` content on its own
        - **Audio handling:**
          - With `audio_urls`: the model uses the provided audio as the driving source
          - Without `audio_urls`: the model auto-generates background music or sound effects matching the visual content
        - Asynchronous processing mode, use the returned task ID to [query
        status](/en/api-manual/task-management/get-task-detail)

        - Generated video links are valid for 24 hours, please save them
        promptly
      operationId: createWan27TextToVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan27TextToVideoRequest'
            examples:
              single_shot:
                summary: Single-shot text-to-video
                value:
                  model: wan2.7-text-to-video
                  prompt: A small kitten running under the moonlight
                  aspect_ratio: '16:9'
                  duration: 5
              multi_shot_storyboard:
                summary: Multi-shot storyboard narrative
                value:
                  model: wan2.7-text-to-video
                  prompt: >-
                    A tense detective chase story. Shot 1 [0-3s] wide angle:
                    rainy night street, neon lights flickering. Shot 2 [3-6s]
                    medium: detective enters an old building. Shot 3 [6-9s]
                    close-up: detective's determined eyes, distant sirens. Shot
                    4 [9-12s] medium: cautious advance through dim corridor.
                    Shot 5 [12-15s] close-up: discovers key clue, sudden
                    realization.
                  aspect_ratio: '16:9'
                  duration: 15
              with_audio:
                summary: With driving audio
                value:
                  model: wan2.7-text-to-video
                  prompt: >-
                    A tiny cute cartoon kitten general in golden armor riding a
                    war horse, reciting a classical poem
                  audio_urls:
                    - https://example.com/recital.mp3
                  duration: 10
              with_negative_prompt:
                summary: Using negative prompt
                value:
                  model: wan2.7-text-to-video
                  prompt: A small kitten running under the moonlight
                  negative_prompt: flowers
      responses:
        '200':
          description: Video task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthenticated, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Insufficient quota, top-up required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: No access permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: wan2.7-text-to-video'
                  type: invalid_request_error
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    Wan27TextToVideoRequest:
      required:
        - model
        - prompt
      type: object
      properties:
        model:
          type: string
          description: Model name, must be `wan2.7-text-to-video`
          enum:
            - wan2.7-text-to-video
          example: wan2.7-text-to-video
        prompt:
          type: string
          description: >-
            Text prompt for video generation. Supports both Chinese and English;
            each character/letter counts as 1, with overflow auto-truncated.
            Maximum length: 5000 characters


            **Multi-shot narrative:** Control shot structure via natural
            language

            - Single shot: state "generate a single-shot video" in the prompt

            - Multi shot: use "generate a multi-shot video" or timestamped shot
            lists (e.g. "Shot 1 [0-3s]")
          maxLength: 5000
          example: A small kitten running under the moonlight
        negative_prompt:
          type: string
          description: >-
            Negative prompt describing what should not appear in the video.
            Supports both Chinese and English. Maximum length 500 characters;
            overflow is auto-truncated
          maxLength: 500
          example: Blurry, low quality
        audio_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
          description: >-
            Driving audio URL array (optional). **Currently supports only 1
            element**


            **Behavior:**

            - Provided: the model uses this audio as the driving source

            - Omitted: the model auto-generates background music or sound
            effects matching the visual content


            **Format requirements:**

            - Supported formats: `wav`, `mp3`

            - Duration range: `2 ~ 30` seconds

            - File size: up to `15MB`


            **Truncation handling:**

            - If audio length exceeds `duration`, the first N seconds are
            extracted and the rest discarded

            - If audio length is shorter than the video duration, the remaining
            portion is silent. For example: if audio is 3s and video duration is
            5s, the first 3s have sound and the last 2s are silent
          example:
            - https://example.com/audio.mp3
        quality:
          type: string
          description: |-
            Video quality, defaults to `720p`

            **Options:**
            - `720p`: Standard definition, standard price, this is the default
            - `1080p`: High definition, higher price
          enum:
            - 720p
            - 1080p
          default: 720p
          example: 720p
        aspect_ratio:
          type: string
          description: >-
            Video aspect ratio, defaults to `16:9`


            **Output resolution per quality tier:**


            | Quality | 16:9 | 9:16 | 1:1 | 4:3 | 3:4 |

            | --- | --- | --- | --- | --- | --- |

            | 720p | 1280×720 | 720×1280 | 960×960 | 1104×832 | 832×1104 |

            | 1080p | 1920×1080 | 1080×1920 | 1440×1440 | 1648×1248 | 1248×1648
            |
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
          default: '16:9'
          example: '16:9'
        duration:
          type: number
          description: |-
            Video duration in seconds, range 2-15

            **Note:**
            - Any integer value between `2~15` seconds is supported
            - Final billing is based on the actual generated video duration
          minimum: 2
          maximum: 15
          default: 5
          example: 5
        seed:
          type: integer
          description: >-
            Random seed, defaults to random


            **Notes:**

            - Range: `1` ~ `2147483647`

            - Fixing the seed reduces variation when iterating on prompts and
            improves reproducibility
          minimum: 1
          maximum: 2147483647
          example: 42
        prompt_extend:
          type: boolean
          description: >-
            Whether to enable intelligent prompt rewriting. When enabled, a
            large model will optimize the prompt, which significantly improves
            results for simple or insufficiently descriptive prompts.


            **Note:** Default is `false`. Omitting the field or sending `false`
            will not trigger rewriting; explicitly send `true` to enable.
          default: false
          example: false
        callback_url:
          type: string
          description: >-
            HTTPS callback URL for task completion


            **Callback Timing:**

            - Triggered when task is completed, failed, or cancelled

            - Sent after billing confirmation


            **Security Restrictions:**

            - Only HTTPS protocol is supported

            - Callbacks to internal IP addresses are prohibited (127.0.0.1,
            10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)

            - URL length must not exceed `2048` characters


            **Callback Mechanism:**

            - Timeout: `10` seconds

            - Up to `3` retries after failure (retries at `1`/`2`/`4` seconds
            after failure)

            - Callback response format is consistent with the task query API
            response

            - 2xx status codes are considered successful, other status codes
            trigger retries
          format: uri
          example: https://your-domain.com/webhooks/video-task-completed
    VideoGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: Task creation timestamp
          example: 1757169743
        id:
          type: string
          description: Task ID
          example: task-unified-1757169743-7cvnl5zw
        model:
          type: string
          description: Actual model name used
          example: wan2.7-text-to-video
        object:
          type: string
          enum:
            - video.generation.task
          description: Specific task type
        progress:
          type: integer
          description: Task progress percentage (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: Task status
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/VideoTaskInfo'
          description: Detailed video task information
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: Task output type
          example: video
        usage:
          $ref: '#/components/schemas/Usage'
          description: Usage and billing information
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code identifier
            message:
              type: string
              description: Error description
            type:
              type: string
              description: Error type
    VideoTaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: Whether the task can be cancelled
          example: true
        estimated_time:
          type: integer
          description: Estimated completion time (seconds)
          minimum: 0
          example: 120
    Usage:
      type: object
      description: Usage and billing information
      properties:
        billing_rule:
          type: string
          description: Billing rule
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: Estimated credits to be consumed
          minimum: 0
          example: 5
        user_group:
          type: string
          description: User group category
          enum:
            - default
            - vip
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ## All APIs require Bearer Token authentication ##


        **Get your API Key:**


        Visit the [API Key management page](https://evolink.ai/dashboard/keys)
        to obtain your API Key


        **Add to request headers:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````