Wan 3.0 Video
Model Overview
Wan 3.0 — an all-in-one reference-based video generation model by Alibaba Cloud. It supports text-to-video, image-to-video (first/last frame), and reference-based generation from images, videos, audio, documents, and web links, producing videos up to 30 seconds long.
Setup your API Key
If you don't have an API key yet, use our Quickstart guide.
How to Make a Call
API Schemas
Create a video generation task and send it to the server
The text description of the scene, subject, or action to generate in the video.
The URL of the image strictly used as the first frame of the video. Cannot be used together with reference media, file_url, or link_url.
The URL of the image strictly used as the last frame of the video. Requires image_url.
Array of image URLs for multi-image-to-video generation.
Reference video URLs. Up to 5 clips with a total duration of no more than 15 seconds.
Reference audio URLs. Up to 5 clips with a total duration of no more than 15 seconds.
The URL of a document (docx, doc, xlsx, xls, pptx, ppt, pdf, txt, key, pages, numbers, md) the model uses to generate the video. Cannot be used together with link_url.
The URL of a publicly accessible web page the model uses to generate the video. Cannot be used together with file_url.
The aspect ratio of the generated video.
adaptivePossible values: An enumeration where the short side of the video frame determines the resolution.
1080pPossible values: The length of the output video in seconds, from 2 to 30. When reference videos are provided, the total input video duration plus the output video duration must not exceed 30 seconds.
5Specifies whether the output video contains audio.
trueVarying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen.
Whether the video contains a watermark.
falseSuccessful response.
The ID of the generated video.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl --request POST \
--url 'https://api.aimlapi.com/v2/video/generations' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{"model": "alibaba/wan-3-0-video", "prompt": "Describe what you want the model to generate.", "image_url": "https://example.com/input.jpg", "duration": 5}'Successful response.
{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"video": {
"url": "https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}Retrieve the generated video from the server
Poll this endpoint with the generation_id returned by the submit request. When the status is completed, the response includes the generated video URL.
Bearer key
<REPLACE_WITH_YOUR_GENERATION_ID>The ID of the generated video.
60ac7c34-3224-4b14-8e7d-0aa0db708325The current status of the generation task.
completedPossible values: curl -L \
--request GET \
--url 'https://api.aimlapi.com/v2/video/generations?generation_id=<REPLACE_WITH_YOUR_GENERATION_ID>' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>'{
"id": "60ac7c34-3224-4b14-8e7d-0aa0db708325",
"status": "completed",
"video": {
"url": "https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4"
},
"error": {
"name": "text",
"message": "text"
},
"meta": {
"usage": {
"credits_used": 120000
}
}
}Code Example
The examples submit a generation task and poll every 15 seconds until the final result is available.
Last updated
Was this helpful?