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

# Wan3.0 Reference-to-Video

> - Reference images / reference videos / reference audio / files / web pages serve as material; the model interprets the intent automatically and generates the video
- Refer to the material in the prompt as "Image 1", "Video 1" and "Audio 1"; **the three material types are counted independently**
- `prompt` and reference material: **at least one of the two must be supplied**
- **First and last frames are not accepted** (`image_start` / `image_end`): reference material and first-and-last frames are mutually exclusive. To strictly control where the picture starts and ends, use [Wan3.0 Image-to-Video](/en/api-manual/video-series/wan3.0/wan3.0-image-to-video) instead
- **🔴 Reference videos count toward billing**, reference images / reference audio / files / web pages are not billed
- 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

## Billing

- **Billing formula**: billed duration = input video duration + output video duration, billed per second
- **Resolution multiplier**: `480p` = 1x (baseline), `720p` = 2x, `1080p` = 4x
- Reference images, reference audio, reference files and web page links are **not billed**
- When `duration` is `-1` (smart duration), credits are pre-authorized at the `30`-second cap; once the task succeeds it is settled against the actual output duration and the difference is refunded automatically
- Turning the `audio` track on or off **costs the same**
- **Failed tasks are not billed**, the frozen credits are refunded in full



## OpenAPI

````yaml en/api-manual/video-series/wan3.0/wan3.0-reference-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: Wan3.0 Reference-to-Video API
  description: >-
    Wan 3.0 reference-to-video, supporting mixed multimodal input: reference
    images, reference videos, reference audio, files and web pages
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Video Generation
    description: AI video generation endpoints
paths:
  /v1/videos/generations:
    post:
      tags:
        - Video Generation
      summary: Wan3.0 Reference-to-Video
      description: >-
        - Reference images / reference videos / reference audio / files / web
        pages serve as material; the model interprets the intent automatically
        and generates the video

        - Refer to the material in the prompt as "Image 1", "Video 1" and "Audio
        1"; **the three material types are counted independently**

        - `prompt` and reference material: **at least one of the two must be
        supplied**

        - **First and last frames are not accepted** (`image_start` /
        `image_end`): reference material and first-and-last frames are mutually
        exclusive. To strictly control where the picture starts and ends, use
        [Wan3.0
        Image-to-Video](/en/api-manual/video-series/wan3.0/wan3.0-image-to-video)
        instead

        - **🔴 Reference videos count toward billing**, reference images /
        reference audio / files / web pages are not billed

        - 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


        ## Billing


        - **Billing formula**: billed duration = input video duration + output
        video duration, billed per second

        - **Resolution multiplier**: `480p` = 1x (baseline), `720p` = 2x,
        `1080p` = 4x

        - Reference images, reference audio, reference files and web page links
        are **not billed**

        - When `duration` is `-1` (smart duration), credits are pre-authorized
        at the `30`-second cap; once the task succeeds it is settled against the
        actual output duration and the difference is refunded automatically

        - Turning the `audio` track on or off **costs the same**

        - **Failed tasks are not billed**, the frozen credits are refunded in
        full
      operationId: createWan30ReferenceVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
            examples:
              multi_modal:
                summary: Multi-material reference (images + video)
                value:
                  model: wan3.0-reference-video
                  prompt: >-
                    The character in Video 1 holds Image 3 and plays a soft
                    country folk tune on the chair in Image 4, saying: “What
                    lovely sunshine today.”
                  image_urls:
                    - https://example.com/role.jpg
                    - https://example.com/object.png
                    - https://example.com/guitar.png
                    - https://example.com/chair.png
                  video_urls:
                    - https://example.com/ref_role.mp4
                  duration: 10
                  quality: 720p
                  aspect_ratio: adaptive
              with_audio:
                summary: With reference audio
                value:
                  model: wan3.0-reference-video
                  prompt: >-
                    The character in Image 1 dances to the rhythm of Audio 1,
                    with the camera orbiting around them.
                  image_urls:
                    - https://example.com/dancer.jpg
                  audio_urls:
                    - https://example.com/beat.mp3
                  duration: 10
              from_file:
                summary: Reference file to video (deck to promo)
                value:
                  model: wan3.0-reference-video
                  prompt: >-
                    Turn this product deck into a high-end product ad,
                    minimalist, futuristic and upmarket overall, with restrained
                    lighting.
                  model_params:
                    file_url: https://example.com/product-deck.pptx
                  duration: 10
                  quality: 1080p
                  aspect_ratio: '16:9'
              from_link:
                summary: Reference web page to video
                value:
                  model: wan3.0-reference-video
                  prompt: >-
                    Turn the key points of this article into a short
                    infographic-style video.
                  model_params:
                    link_url: https://example.com/article/12345
                  duration: 15
      responses:
        '200':
          description: Video generation 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_parameter
                  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, recharge 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: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: wan3.0-reference-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:
    VideoGenerationRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          description: Model name, fixed to `wan3.0-reference-video`
          enum:
            - wan3.0-reference-video
          example: wan3.0-reference-video
          default: wan3.0-reference-video
        prompt:
          type: string
          description: >-
            Text prompt for video generation. Chinese and English are supported,
            **each Chinese character / letter counts as 1 character**, maximum
            length `20000` characters; anything beyond that is truncated
            automatically (no error)


            **Material reference rules:**

            - Use "Image 1", "Image 2" to refer to the images at the matching
            positions in `image_urls` (1-based)

            - Use "Video 1", "Video 2" to refer to the videos at the matching
            positions in `video_urls`

            - Use "Audio 1", "Audio 2" to refer to the audio at the matching
            positions in `audio_urls`

            - **Images, videos and audio are counted independently**, so "Image
            1" and "Video 1" can both exist

            - In English prompts write "Image 1", "Video 1", "Audio 1"
            (capitalised, with a space between the word and the number)
          example: >-
            The character in Video 1 holds Image 3 and plays a soft country folk
            tune on the chair in Image 4, saying: “What lovely sunshine today.”
        image_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 10
          description: >-
            Array of reference image URLs, **up to 10 images**. They can supply
            subjects (people / animals / objects) or scene backgrounds; when a
            subject is included, each image should contain a **single**
            character


            The array order matches "Image 1, Image 2, ..." in the prompt.


            **Image limits:**

            - Formats: JPEG, JPG, PNG (transparency not supported), BMP, WEBP

            - Resolution: width and height in `[240, 8000]` pixels

            - Aspect ratio: 1:8 ~ 8:1

            - File size: up to `20MB`
          example:
            - https://example.com/ref1.jpg
            - https://example.com/ref2.png
        video_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 5
          description: >-
            Array of reference video URLs, **up to 5 clips**. The array order
            matches "Video 1, Video 2, ..." in the prompt


            **Duration limits:**

            - `1 ~ 15` seconds per clip

            - **15 seconds in total at most**

            - Total reference video duration + output video duration **must not
            exceed 30 seconds**


            **🔴 Reference videos count toward billing**: billed duration =
            input video duration + output video duration. Reference images,
            reference audio, files and web pages are not billed


            **Video limits:**

            - Formats: mp4, mov

            - Resolution: width and height in `[240, 4096]` pixels

            - Aspect ratio: 1:8 ~ 8:1

            - Size per file: up to `100MB`
          example:
            - https://example.com/ref_video.mp4
        audio_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 5
          description: >-
            Array of reference audio URLs, **up to 5 clips**. The array order
            matches "Audio 1, Audio 2, ..." in the prompt


            **⚠️ Different semantics from Wan2.7:** in Wan2.7, `audio_urls`
            carried a **voice** bound to a specific reference image / reference
            video; in Wan3.0 reference audio is **standalone material** referred
            to directly from the prompt as "Audio 1", and the
            `model_params.voice_bindings` voice-binding protocol is **not
            supported**. Rewrite accordingly when migrating from Wan2.7.


            **Duration limits:**

            - `1 ~ 15` seconds per clip, 15 seconds in total at most

            - Reference audio is **not billed**


            **Audio limits:**

            - Formats: wav, mp3

            - File size: up to `15MB`
          example:
            - https://example.com/ref_audio.mp3
        model_params:
          type: object
          description: >-
            Model extension parameters. `file_url` and `link_url` are **mutually
            exclusive**, pick one of the two
          properties:
            file_url:
              type: string
              format: uri
              description: >-
                Reference file URL, **at most 1**. The model interprets the
                file's content automatically and generates the video from it
                (for example turning a product deck into a promo video)


                **Mutually exclusive with `link_url`**, the two cannot be
                supplied together


                **File limits:**

                - Formats: docx, doc, xlsx, xls, pptx, ppt, pdf, txt, key,
                pages, numbers, md

                - File size: up to `100MB`

                - Pages: no more than 50
              example: https://example.com/product-deck.pptx
            link_url:
              type: string
              format: uri
              description: >-
                Reference web page link, **at most 1**. The model fetches and
                interprets the page content automatically, then generates the
                video


                **Mutually exclusive with `file_url`**, the two cannot be
                supplied together


                **Limitation:** only public pages that **require no login** can
                be parsed (news articles, blog posts, newsletter articles, etc.)
              example: https://example.com/article/12345
        duration:
          type: integer
          description: >-
            Duration of the generated video in seconds, defaults to `5`


            **Accepted values:**

            - Any integer between `2` and `30`

            - `-1`: smart duration, the model decides the output length from the
            prompt and the input material


            **How smart duration is billed:** the output length cannot be known
            at submission time, so credits are pre-authorized at the `30`-second
            **cap**; once the task succeeds it is settled against the actual
            output duration and the excess hold is released automatically. If
            your balance cannot cover the capped hold, pass an explicit number
            of seconds instead.


            **Extra constraint when reference videos are supplied:**

            - Total reference video duration + output video duration **must not
            exceed 30 seconds**

            - Example: with 10 seconds of reference video in total, `duration`
            can be at most 20
          default: 5
          example: 5
        quality:
          type: string
          description: >-
            Video resolution, defaults to `720p`


            **Options:**

            - `480p`: lower definition, lowest price (billing baseline)

            - `720p`: standard definition, this is the default, 2x the price of
            `480p`

            - `1080p`: high definition, 4x the price of `480p`
          enum:
            - 480p
            - 720p
            - 1080p
          default: 720p
          example: 720p
        aspect_ratio:
          type: string
          description: >-
            Video aspect ratio, defaults to `adaptive`


            **Options:**

            - `adaptive`: adaptive, the model recommends a suitable aspect ratio
            based on the input material's ratio and the intent of the prompt,
            this is the default

            - `16:9` (landscape), `9:16` (portrait), `1:1` (square), `4:3`,
            `3:4`
          enum:
            - adaptive
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
          default: adaptive
          example: '16:9'
        generate_audio:
          type: boolean
          description: >-
            Whether the output video contains an audio track, defaults to `true`


            **Options:**

            - `true`: the output video contains sound (voices, sound effects,
            background music), this is the default

            - `false`: silent video output


            **Sound on and sound off cost the same**, there is no extra charge.
          default: true
          example: true
        seed:
          type: integer
          description: >-
            Random seed, used to reproduce generation results, random by default


            **Notes:**

            - Range: `0` ~ `2147483647`

            - Fixing the seed reduces variation when iterating on prompts and
            improves reproducibility
          minimum: 0
          maximum: 2147483647
          example: 42
        callback_url:
          type: string
          description: >-
            HTTPS callback URL for task completion


            **Callback timing:**

            - Triggered when the task is completed, failed, or cancelled

            - Sent after billing confirmation is complete


            **Security restrictions:**

            - Only HTTPS protocol is supported

            - Callbacks to private 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 (at `1`/`2`/`4` seconds after
            failure respectively)

            - Callback response body format is consistent with the task query
            endpoint response format

            - A 2xx status code is 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: 1761313744
        id:
          type: string
          description: Task ID
          example: task-unified-1774857405-abc123
        model:
          type: string
          description: Actual model name used
          example: wan3.0-reference-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: Video task details
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: Task output type
          example: video
        usage:
          $ref: '#/components/schemas/VideoUsage'
          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: 165
        video_duration:
          type: integer
          description: Video duration (seconds)
          example: 8
    VideoUsage:
      type: object
      description: Usage and billing information
      properties:
        billing_rule:
          type: string
          description: Billing rule
          enum:
            - per_call
            - per_token
            - per_second
          example: per_second
        credits_reserved:
          type: number
          description: Estimated credits consumed
          minimum: 0
          example: 50
        user_group:
          type: string
          description: User group category
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##All endpoints require Bearer Token authentication##


        **Get API Key:**


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


        **Add to request header:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````