> ## 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.

# Wan 3.0 - Video Generation

> Create task to get task ID

This is the **Wan 3.0 Video Generation API** task creation endpoint.


## OpenAPI

````yaml openapi/en/wan.json POST /wan/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.1.0
info:
  title: Wan 3.0 - Video Generation DOCS
  version: 1.0.0
  description: >-
    Wan 3.0 video generation API provides efficient video generation
    capabilities, supporting text-to-video, image-to-video and other modes.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /wan/api/v1/services/aigc/video-generation/video-synthesis:
    post:
      description: Create task to get task ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
          description: Successful response
        '400':
          $ref: '#/components/responses/ErrorResponse'
          description: Parameter error
        '401':
          $ref: '#/components/responses/ErrorResponse'
          description: Authorization failed
      security:
        - CustomApiKey: []
components:
  schemas:
    VideoGenerationRequest:
      type: object
      description: Wan 3.0 video generation request parameters
      properties:
        model:
          type: string
          description: |-
            Model name. Available values:
            - `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. Required if
                media is not provided.


                Supports Chinese and English, each character counts as one
                character, up to 20,000 characters. Excess will be automatically
                truncated.


                In reference mode, you can use "Image 1", "Video 1" etc. in the
                prompt to refer to media elements in corresponding order in the
                media array.
            media:
              type: array
              description: >-
                Media material array, supports images, videos, audio, files and
                web pages as input. Required if prompt is not provided.


                - Each element in the array is a media object containing type
                and url fields.

                - In reference-to-video mode, the order of media references in
                the prompt is defined by the array order. Images and videos are
                counted separately, so Image 1 and Video 1 can coexist.
                  - The 1st reference_video in the array corresponds to **Video 1**, the 2nd to **Video 2**, and so on.
                  - The 1st reference_image in the array corresponds to **Image 1**, the 2nd to **Image 2**, and so on.
                  - The 1st reference_audio in the array corresponds to **Audio 1**, the 2nd to **Audio 2**, and so on.
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: >-
                      Media material type. Available values:

                      - `first_frame`: First frame image. Maximum 1 image,
                      strictly used as the first frame of the video.

                      - `last_frame`: Last frame image. Maximum 1 image,
                      strictly used as the last frame of the video.

                      - `reference_image`: Reference image. Maximum 10 images.

                      - `reference_video`: Reference video. Maximum 5 videos,
                      total duration no more than 15 seconds.

                      - `reference_audio`: Reference audio. Maximum 5 audio
                      clips, total duration no more than 15 seconds.

                      - `file`: File. Maximum 1 file, cannot be used with link
                      simultaneously.

                      - `link`: Web page link. Maximum 1 link, cannot be used
                      with file simultaneously.
                    enum:
                      - first_frame
                      - last_frame
                      - reference_image
                      - reference_video
                      - reference_audio
                      - file
                      - 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.
                Available values:

                - 1080P

                - 720P

                - 480P
              default: 1080P
              enum:
                - 1080P
                - 720P
                - 480P
              example: 1080P
            ratio:
              type: string
              description: >-
                Aspect ratio of generated video. Available values:

                - adaptive (default): Adaptive aspect ratio, automatically
                recommends suitable aspect ratio based on input media ratio and
                intent.

                - 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. Default is 5.


                - Without video input: Integer value in range [2, 30].

                - With video input: Total input video duration + output video
                duration must not exceed 30 seconds.

                - When set to -1: Smart duration mode, model automatically
                recommends appropriate duration based on input prompt, content
                and rich media.
              default: 5
              example: 10
            audio:
              type: boolean
              description: |-
                Whether output video includes audio.
                - true: Default value, output video includes sound.
                - false: Output video does not include audio track.

                Price is the same regardless of audio setting.
              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. When enabled,
                uses large model to intelligently rewrite input prompt.
                Significantly improves results for shorter prompts, but
                increases processing time.

                - true: Default value, enables intelligent rewriting.

                - false: Disables intelligent rewriting.
              default: true
              example: true
            watermark:
              type: boolean
              description: |-
                Whether to add watermark.
                - false: Default value, no watermark added.
                - true: Add watermark.
              default: false
              example: false
      required:
        - model
        - input
  responses:
    SuccessResponse:
      description: Request successful
      content:
        application/json:
          schema:
            type: object
            properties:
              output:
                type: object
                description: Task output information
                properties:
                  task_status:
                    type: string
                    description: Task status
                    enum:
                      - PENDING
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - CANCELED
                      - UNKNOWN
                    example: PENDING
                  task_id:
                    type: string
                    description: Task ID. Query is valid for 24 hours.
                    example: 0385dc79-5ff8-4d82-bcb6-xxxxxx
              request_id:
                type: string
                description: >-
                  Unique request identifier. Can be used for request
                  traceability and troubleshooting.
                example: 4909100c-7b5a-9f92-bfe5-xxxxxx
            example:
              output:
                task_status: PENDING
                task_id: 0385dc79-5ff8-4d82-bcb6-xxxxxx
              request_id: 4909100c-7b5a-9f92-bfe5-xxxxxx
            required:
              - output
              - request_id
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              request_id:
                type: string
                description: Unique request identifier
                example: e5d70b02-ebd3-98ce-9fe8-759d7d7b107d
              code:
                type: string
                description: Error code
                example: InvalidParameter
              message:
                type: string
                description: Error message
                example: The resolution is not valid
            required:
              - request_id
              - code
              - message
  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.

````