Skip to main content
POST
Video generation using Wan 3.0 Prime

Authorizations

x-magnific-api-key
string
header
required

Your Magnific API key. Required for authentication. Learn how to obtain an API key

Body

application/json

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.

prompt
string
required

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.

Required string length: 1 - 20000
Example:

"Image 1 walks along a beach at sunset while the waves roll in, saying 'What a day'"

webhook_url
string<uri>

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"

image_urls
string[]

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.

Maximum array length: 10
video_urls
string[]

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.

Maximum array length: 5
audio_urls
string<uri>[]

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.

Maximum array length: 5
start_image_url
string

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"

end_image_url
string

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"

aspect_ratio
enum<string>
default:16:9

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
Available options:
16:9,
9:16,
1:1,
4:3,
3:4
resolution
enum<string>
default:1080P

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
Available options:
480P,
720P,
1080P
duration
integer
default:5

Duration of the output video in seconds. It sets the price together with resolution.

Required range: 2 <= x <= 30
Example:

5

generate_audio
boolean
default:true

Whether to generate a synchronized audio track (dialogue, sound effects, music) with the video. It does not affect the price.

Example:

true

seed
integer

Random seed for reproducible generation. Fixing it improves reproducibility but does not guarantee identical results.

Required range: 0 <= x <= 2147483647
Example:

12345

Response

OK - The request has succeeded and the Wan 3.0 Prime process has started.

data
object
required
Example: