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

# Reference to Video

> Create reference-to-video task

This is the **Wan 3.0 Video Generation API** reference-to-video endpoint. Generate video by uploading reference materials with types `reference_image`, `reference_video`, or `reference_audio`, combined with prompt.


## OpenAPI

````yaml openapi/en/wan-reference-to-video.json POST /wan/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.1.0
info:
  title: Wan 3.0 - Reference to Video DOCS
  version: 1.0.0
  description: >-
    Wan 3.0 Reference to Video API - Generate video by uploading reference
    materials with types `reference_image`, `reference_video`, or
    `reference_audio`, combined with prompt.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /wan/api/v1/services/aigc/video-generation/video-synthesis:
    post:
      description: Create reference-to-video task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReferenceToVideoRequest'
            examples:
              reference_image_example:
                summary: Reference Image Example
                description: >-
                  Generate video using reference image, supports multiple media
                  type combinations
                value:
                  model: wan3.0-video
                  input:
                    prompt: >-
                      A peaceful landscape with gentle breeze blowing through
                      the grass
                    media_list:
                      - type: reference_image
                        url: https://example.com/reference-image.jpg
                      - type: reference_video
                        url: https://example.com/reference-video.mp4
                      - type: reference_audio
                        url: https://example.com/audio.mp3
                      - type: link
                        url: https://example.com/article
                      - type: file
                        url: https://example.com/document.pdf
                  parameters:
                    resolution: 720P
                    duration: 5
              reference_video_example:
                summary: Reference Video Example
                description: Generate new video using reference video
                value:
                  model: wan3.0-video
                  input:
                    prompt: Keep the same style but change the scene
                    media_list:
                      - type: reference_video
                        url: https://example.com/reference-video.mp4
                  parameters:
                    resolution: 1080P
                    duration: 10
              reference_audio_example:
                summary: Reference Audio Example
                description: Generate video using reference audio
                value:
                  model: wan3.0-video
                  input:
                    prompt: Video that matches the rhythm of the audio
                    media_list:
                      - type: reference_audio
                        url: https://example.com/audio.mp3
                  parameters:
                    resolution: 720P
                    duration: 5
              link_example:
                summary: Web Link Example
                description: Generate video using web link
                value:
                  model: wan3.0-video
                  input:
                    prompt: Generate video based on webpage content
                    media_list:
                      - type: link
                        url: https://example.com/article
                  parameters:
                    resolution: 720P
                    duration: 5
              file_example:
                summary: File Example
                description: Generate video using uploaded file
                value:
                  model: wan3.0-video
                  input:
                    prompt: Generate video based on file content
                    media_list:
                      - type: file
                        url: https://example.com/document.pdf
                  parameters:
                    resolution: 720P
                    duration: 5
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  output:
                    type: object
                    properties:
                      task_status:
                        type: string
                        description: Task status
                        enum:
                          - PENDING
                          - RUNNING
                          - SUCCEEDED
                          - FAILED
                          - CANCELED
                          - UNKNOWN
                        example: PENDING
                      task_id:
                        type: string
                        description: Task ID. Valid for query within 24 hours.
                        example: 0385dc79-5ff8-4d82-bcb6-xxxxxx
                  request_id:
                    type: string
                    description: Unique request identifier.
                    example: 4909100c-7b5a-9f92-bfe5-xxxxxx
      security:
        - CustomApiKey: []
components:
  schemas:
    ReferenceToVideoRequest:
      type: object
      description: Reference to video request parameters
      properties:
        model:
          type: string
          description: |-
            Model name. Options:
            - `wan3.0-video`: Standard version.
          enum:
            - wan3.0-video
          example: wan3.0-video
        input:
          type: object
          description: Input basic information. Either prompt or media is required.
          properties:
            prompt:
              type: string
              description: >-
                Text prompt describing the expected video content. Supports
                Chinese and English, up to 20000 characters. In
                reference-to-video mode, you can use 'Image 1', 'Video 1',
                'Audio 1' etc. to refer to media materials in the corresponding
                order of the media array.
            media:
              type: array
              description: >-
                Media materials array. In reference-to-video mode, use type:
                'reference_image', 'reference_video', 'reference_audio', or
                'link' to upload reference materials. **Important**:
                `reference_xx/file/link` types are mutually exclusive and cannot
                be mixed in the same request.
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: >-
                      Media material type. Reference-to-video uses the following
                      types:

                      - `reference_image`: Reference image. Up to 10 images.

                      - `reference_video`: Reference video. Up to 5 segments,
                      total duration no more than 15 seconds.

                      - `reference_audio`: Reference audio. Up to 5 segments,
                      total duration no more than 15 seconds.

                      - `link`: Web link. Up to 1 link, cannot be used with file
                      simultaneously.

                      - `file`: File. Maximum 1, cannot be used with link
                      simultaneously.
                    enum:
                      - reference_image
                      - reference_video
                      - reference_audio
                      - link
                    example: reference_image
                  url:
                    type: string
                    description: Media material URL or Base64 encoded data.
                required:
                  - type
                  - url
        parameters:
          type: object
          description: Video processing parameters.
          properties:
            resolution:
              type: string
              description: >-
                Resolution level for generated video. Default is 1080P. Options:
                1080P, 720P, 480P
              default: 1080P
              enum:
                - 1080P
                - 720P
                - 480P
              example: 1080P
            ratio:
              type: string
              description: >-
                Aspect ratio for generated video. Options: adaptive (default),
                16:9, 4:3, 1:1, 3:4, 9:16
              default: adaptive
              enum:
                - adaptive
                - '16:9'
                - '4:3'
                - '1:1'
                - '3:4'
                - '9:16'
              example: adaptive
            duration:
              type: integer
              description: >-
                Duration of generated video in seconds. Integer range [2, 30],
                or -1 for smart duration mode.
              default: 5
              example: 10
            audio:
              type: boolean
              description: >-
                Whether output video includes audio. true: includes sound
                (default), false: no audio track.
              default: true
              example: true
            seed:
              type: integer
              description: >-
                Random seed for reproducing generation results. Range: [0,
                2147483647].
              minimum: 0
              maximum: 2147483647
              example: 12345
            prompt_extend:
              type: boolean
              description: >-
                Whether to enable intelligent prompt rewriting. true: enabled
                (default), false: disabled.
              default: true
              example: true
            watermark:
              type: boolean
              description: >-
                Whether to add watermark. false: no watermark (default), true:
                add watermark.
              default: false
              example: false
      required:
        - model
        - input
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        Please visit <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI
        Dashboard</a> to get your API key.

````