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

# File to Video

> Create file-to-video task

This is the **Wan 3.0 Video Generation API** file-to-video endpoint. Generate video by uploading a file with type `file`, and the model automatically understands the file content.


## OpenAPI

````yaml openapi/en/wan-file-to-video.json POST /wan/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.1.0
info:
  title: Wan 3.0 - File to Video DOCS
  version: 1.0.0
  description: >-
    Wan 3.0 File to Video API - Upload files using file type, model
    automatically understands file content to generate video.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /wan/api/v1/services/aigc/video-generation/video-synthesis:
    post:
      description: Create file-to-video task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileToVideoRequest'
      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:
    FileToVideoRequest:
      type: object
      description: File 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.
            media:
              type: array
              description: >-
                Media materials array. In file-to-video mode, use type: 'file'
                to upload files.
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: >-
                      Media material type. File-to-video uses `file` type.
                      Maximum 1, cannot be used with link simultaneously.
                    enum:
                      - file
                    example: file
                  url:
                    type: string
                    description: File 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.

````