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

# Create Video (Wan 3.0)

> Generate a video with Wan 3.0, Alibaba's unified video model. One
endpoint covers every mode, chosen by the fields you send:

- **Text-to-video**: `prompt` only.
- **First/last frame**: `start_image_url`, optionally with `end_image_url`
  (a last frame needs a first frame).
- **References**: up to 10 `image_urls`, 5 `video_urls` and 5 `audio_urls`
  for characters, motion, voice or style. Not combinable with keyframes.

**Output:** one MP4 video of 2 to 30 seconds at 480p, 720p or 1080p (the
short side is 480, 720 or 1080 px, e.g. 854x480 at 16:9), with native
audio by default. The finished task carries the video URL in its
`generated` array.

**Credits:** priced per second by `resolution`. The billed seconds are
`duration` plus the combined duration of the `video_urls`, capped at 15
seconds. Images and audios do not change the price.

The request is processed asynchronously: the endpoint returns a `task_id`
immediately. Retrieve the result by polling
`GET /v1/ai/video/wan-3-0/{task-id}` or by providing an optional `webhook_url`.




## OpenAPI

````yaml POST /v1/ai/video/wan-3-0
openapi: 3.0.0
info:
  description: >-
    The Magnific API is your gateway to a vast collection of high-quality
    digital resources for your applications and projects. As a leading platform,
    it offers a wide range of graphics, including vectors, photos,
    illustrations, icons, PSD templates, and more, all curated by talented
    designers from around the world.
  title: Magnific API
  version: 1.0.0
servers:
  - description: B2B API Production V1
    url: https://api.magnific.com
security:
  - magnificApiKey: []
paths:
  /v1/ai/video/wan-3-0:
    post:
      tags:
        - video
      summary: Video generation using Wan 3.0
      description: >
        Generate a video with Wan 3.0, Alibaba's unified video model. One

        endpoint covers every mode, chosen by the fields you send:


        - **Text-to-video**: `prompt` only.

        - **First/last frame**: `start_image_url`, optionally with
        `end_image_url`
          (a last frame needs a first frame).
        - **References**: up to 10 `image_urls`, 5 `video_urls` and 5
        `audio_urls`
          for characters, motion, voice or style. Not combinable with keyframes.

        **Output:** one MP4 video of 2 to 30 seconds at 480p, 720p or 1080p (the

        short side is 480, 720 or 1080 px, e.g. 854x480 at 16:9), with native

        audio by default. The finished task carries the video URL in its

        `generated` array.


        **Credits:** priced per second by `resolution`. The billed seconds are

        `duration` plus the combined duration of the `video_urls`, capped at 15

        seconds. Images and audios do not change the price.


        The request is processed asynchronously: the endpoint returns a
        `task_id`

        immediately. Retrieve the result by polling

        `GET /v1/ai/video/wan-3-0/{task-id}` or by providing an optional
        `webhook_url`.
      operationId: create_wan_3_0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/wan-3-0-request'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                success - in progress task:
                  $ref: '#/components/examples/200-task-in-progress'
              schema:
                $ref: >-
                  #/components/schemas/get_style_transfer_task_status_200_response
          description: OK - The request has succeeded and the Wan 3.0 process has started.
        '400':
          $ref: '#/components/responses/400-bad-request'
        '401':
          $ref: '#/components/responses/401-unauthorized'
        '500':
          $ref: '#/components/responses/500-internal-server-error'
        '503':
          $ref: '#/components/responses/503-service-unavailable'
components:
  schemas:
    wan-3-0-request:
      description: >
        Wan 3.0, Alibaba's unified video model. One request covers
        text-to-video,

        first/last frame image-to-video and reference-guided generation from

        images, videos and audios. The mode follows from the fields you send.


        References (`image_urls`, `video_urls`, `audio_urls`) and keyframes

        (`start_image_url`, `end_image_url`) are mutually exclusive: a request

        that mixes them is rejected.


        **Reference videos are billed.** The provider charges this model as the

        output duration PLUS the combined duration of the reference videos,

        capped at 15 seconds, and that is what the API charges. Reference images

        and audios add nothing to the price.
      properties:
        webhook_url:
          description: >
            Optional callback URL that will receive asynchronous notifications
            whenever the task changes status. The payload sent to this URL is
            the same as the corresponding GET endpoint response, but without the
            data field.
          example: https://www.example.com/webhook
          format: uri
          type: string
        prompt:
          description: >
            Text description of the video to generate, including action and

            dialogue. Chinese and English are supported. Refer to references by

            their position in each list: "Image 1" is the first item of

            `image_urls`, "Video 1" the first item of `video_urls`, "Audio 1"
            the

            first item of `audio_urls`.
          example: >-
            Image 1 walks along a beach at sunset while the waves roll in,
            saying 'What a day'
          maxLength: 20000
          minLength: 1
          type: string
        image_urls:
          description: |
            Up to 10 reference images for characters, objects, scenes or style.
            Each item is a public HTTPS URL, a base64-encoded image or an upload
            id (`upl_...`). JPEG, PNG (no alpha channel), BMP or WEBP, at most
            20 MB, 240 to 8000 px per side, aspect ratio up to 8:1. Mutually
            exclusive with `start_image_url` and `end_image_url`.
          items:
            type: string
          maxItems: 10
          type: array
        video_urls:
          description: >
            Up to 5 reference videos for motion, appearance or voice. Each item
            is

            a public HTTPS URL or a video upload id (`upl_vid_...`). MP4 or MOV,

            1 to 15 seconds each and at most 15 seconds combined, at most 100
            MB,

            240 to 4096 px per side, aspect ratio up to 8:1. The combined

            duration plus `duration` must not exceed 30 seconds. Mutually

            exclusive with `start_image_url` and `end_image_url`.


            **These are billed**: their combined duration is added to the output

            duration, capped at 15 seconds.
          items:
            type: string
          maxItems: 5
          type: array
        audio_urls:
          description: >
            Up to 5 reference audios for voice timbre or soundtrack. Each item
            is

            a public HTTPS URL. WAV or MP3, 1 to 15 seconds each and at most 15

            seconds combined, at most 15 MB. Mutually exclusive with

            `start_image_url` and `end_image_url`. Adds nothing to the price.
          items:
            format: uri
            type: string
          maxItems: 5
          type: array
        start_image_url:
          description: >
            Optional first frame of the video. A public HTTPS URL, a
            base64-encoded

            image or an upload id (`upl_...`). When supplied, the output follows

            the aspect ratio of this image and `aspect_ratio` is ignored. JPEG,

            PNG (no alpha channel), BMP or WEBP, at most 20 MB, 240 to 8000 px

            per side. Mutually exclusive with every reference field.
          example: https://example.com/start-frame.jpg
          type: string
        end_image_url:
          description: >
            Optional last frame of the video. Requires `start_image_url`: the

            provider rejects a last frame with no first frame. Same formats and
            limits as

            `start_image_url`. Mutually exclusive with every reference field.
          example: https://example.com/end-frame.jpg
          type: string
        aspect_ratio:
          default: '16:9'
          description: >
            Output video aspect ratio. Defaults to `16:9` when not specified.

            Ignored when `start_image_url` is supplied: the output then follows
            the

            aspect ratio of that image.

            - `16:9`: Landscape (widescreen)

            - `9:16`: Portrait (vertical, mobile-optimized)

            - `1:1`: Square

            - `4:3`: Standard landscape

            - `3:4`: Standard portrait
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
          type: string
        resolution:
          default: 1080P
          description: >
            Output video resolution. It sets the price per second. The value is
            the

            short side of the MP4; the long side follows the aspect ratio.

            - `480P`: 480p SD (854x480 at 16:9)

            - `720P`: 720p HD

            - `1080P`: 1080p Full HD
          enum:
            - 480P
            - 720P
            - 1080P
          type: string
        duration:
          default: 5
          description: >-
            Duration of the output video in seconds. It sets the price together
            with `resolution`.
          example: 5
          maximum: 30
          minimum: 2
          type: integer
        generate_audio:
          default: true
          description: >-
            Whether to generate a synchronized audio track (dialogue, sound
            effects, music) with the video. It does not affect the price.
          example: true
          type: boolean
        seed:
          description: >-
            Random seed for reproducible generation. Fixing it improves
            reproducibility but does not guarantee identical results.
          example: 12345
          maximum: 2147483647
          minimum: 0
          type: integer
      required:
        - prompt
      title: Wan 3.0 Video Request
      type: object
    get_style_transfer_task_status_200_response:
      example:
        data:
          generated:
            - https://openapi-generator.tech
            - https://openapi-generator.tech
          task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          status: CREATED
      properties:
        data:
          $ref: '#/components/schemas/task-detail'
      required:
        - data
      type: object
    task-detail:
      allOf:
        - $ref: '#/components/schemas/task'
        - properties:
            generated:
              items:
                description: URL of the generated image
                format: uri
                type: string
              type: array
          required:
            - generated
          type: object
      example:
        generated:
          - https://openapi-generator.tech
          - https://openapi-generator.tech
        task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        status: CREATED
    inline_object:
      example:
        message: message
      properties:
        message:
          type: string
      type: object
    inline_object_1:
      properties:
        problem:
          $ref: '#/components/schemas/inline_object_1_problem'
      type: object
    inline_object_2:
      example:
        message: Internal Server Error
      properties:
        message:
          example: Internal Server Error
          type: string
      type: object
    inline_object_3:
      example:
        message: Service Unavailable. Please try again later.
      properties:
        message:
          example: Service Unavailable. Please try again later.
          type: string
      type: object
    task:
      example:
        task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        status: CREATED
      properties:
        task_id:
          description: Task identifier
          format: uuid
          type: string
        status:
          description: Task status
          enum:
            - CREATED
            - IN_PROGRESS
            - COMPLETED
            - FAILED
          type: string
      required:
        - status
        - task_id
      type: object
    inline_object_1_problem:
      properties:
        message:
          example: Validation error
          type: string
        invalid_params:
          items:
            $ref: '#/components/schemas/inline_object_1_problem_invalid_params_inner'
          type: array
      required:
        - invalid_params
        - message
      type: object
    inline_object_1_problem_invalid_params_inner:
      properties:
        name:
          description: Name of the invalid parameter.
          example: page
          type: string
        field:
          description: Field of the invalid parameter. Mirrors `name`.
          example: page
          type: string
        reason:
          example: Parameter 'page' must be greater than 0
          type: string
      required:
        - field
        - name
        - reason
      type: object
  examples:
    200-task-in-progress:
      summary: Success - Task in progress
      value:
        data:
          generated: []
          task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          status: IN_PROGRESS
  responses:
    400-bad-request:
      content:
        application/json:
          examples:
            invalid_page:
              summary: Parameter 'page' is not valid
              value:
                message: Parameter 'page' must be greater than 0
            invalid_query:
              summary: Parameter 'query' is not valid
              value:
                message: Parameter 'query' must not be empty
            invalid_filter:
              summary: Parameter 'filter' is not valid
              value:
                message: Parameter 'filter' is not valid
            generic_bad_request:
              summary: Bad Request
              value:
                message: Parameter ':attribute' is not valid
          schema:
            $ref: '#/components/schemas/inline_object'
        application/problem+json:
          examples:
            invalid_page:
              summary: Parameter 'page' is not valid
              value:
                message: Validation error
                invalid_params:
                  - field: page
                    reason: Parameter 'page' must be greater than 0
                  - field: per_page
                    reason: Parameter 'per_page' must be greater than 0
          schema:
            $ref: '#/components/schemas/inline_object_1'
      description: >-
        Bad Request - The server could not understand the request due to invalid
        syntax.
    401-unauthorized:
      content:
        application/json:
          examples:
            invalid_api_key:
              summary: API key is not valid
              value:
                message: Invalid API key
            missing_api_key:
              summary: API key is not provided
              value:
                message: Missing API key
          schema:
            $ref: '#/components/schemas/inline_object'
      description: >-
        Unauthorized - The client must authenticate itself to get the requested
        response.
    500-internal-server-error:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_2'
      description: >-
        Internal Server Error - The server has encountered a situation it
        doesn't know how to handle.
    503-service-unavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_3'
      description: Service Unavailable
  securitySchemes:
    magnificApiKey:
      description: >
        Your Magnific API key. Required for authentication. [Learn how to obtain
        an API key](https://docs.magnific.com/quickstart)
      in: header
      name: x-magnific-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.