Wan 3.0 Video
Model ID alibaba/wan-3.0-video
Overview
One endpoint selects text-to-video, keyframe image-to-video, or reference-to-video from the media fields you send. Keyframe and reference inputs cannot be mixed.
Input Modes
The media fields actually sent in the request select which capability runs:
| Media fields sent | Capability | How it works |
|---|---|---|
none (prompt only) | Text-to-video | Send prompt without media fields. |
image and/or end_image | Keyframe image-to-video | Send image, end_image, or both to control the first and/or last frame. |
images and/or videos and/or audios | Reference-to-video | Send any combination of reference media; each media type uses its own 1-based numbering in prompt. |
Important: Keyframe mode (image/end_image) and reference mode (images/videos/audios) are mutually exclusive. Do not mix fields from both groups in one request.
Endpoint
POST /v1/video/generations
Authentication
Authorization: Bearer <AIAPIAIAPI_API_KEY>
Request Body
| Parameter | Type | Required | Nullable | Default | Constraints | Description |
|---|---|---|---|---|---|---|
model | string | Yes | No | - | values: alibaba/wan-3.0-video | Model ID used to route the request. |
prompt | string | No | No | - | - | Text prompt. Use it alone for text-to-video; in reference mode, refer to media with independent 1-based labels such as Image 1, Video 1, and Audio 1. |
image | string | No | No | - | accepts: HTTPS URL, Base64 data URL, Bare Base64 | First-frame image for keyframe mode. Cannot be combined with images, videos, or audios. |
end_image | string | No | No | - | accepts: HTTPS URL, Base64 data URL, Bare Base64 | Last-frame image for keyframe mode. May be sent with or without image, but cannot be combined with reference-mode fields. |
images | array | No | No | - | max_count: 10; accepts: HTTPS URL, Base64 data URL, Bare Base64 | Reference-mode images. Up to 10; reference them in prompt as Image 1, Image 2, and so on. |
videos | array | No | No | - | max_count: 5; accepts: HTTPS URL | Reference-mode videos. Up to 5 HTTPS URLs; reference them in prompt as Video 1, Video 2, and so on. |
audios | array | No | No | - | max_count: 5; accepts: HTTPS URL | Reference-mode audio clips. Up to 5 HTTPS URLs; reference them in prompt as Audio 1, Audio 2, and so on. |
audio_enable | boolean | No | No | `true` | - | Whether to generate audio together with the video. Defaults to true. |
duration | integer | No | No | `5` | range: 2-30; also allows: -1 | Video duration in seconds from 2 to 30, or -1 for smart duration. |
resolution | string | No | No | `1080p` | values: 480p, 720p, 1080p | Output resolution. Accepts 480p, 720p, or 1080p case-insensitively; defaults to 1080p. |
aspect_ratio | string | No | No | `adaptive` | values: adaptive, 16:9, 4:3, 1:1, 3:4, 9:16 | Output aspect ratio. Defaults to adaptive; also supports 16:9, 4:3, 1:1, 3:4, and 9:16. |
seed | integer | No | No | - | range: 0-2147483647 | Random seed from 0 to 2147483647 for reproducible output. Omit it for a random seed. |
model
Type: string · Required: Yes · Nullable: No
Model ID used to route the request.
prompt
Type: string · Required: No · Nullable: No
Text prompt. Use it alone for text-to-video; in reference mode, refer to media with independent 1-based labels such as Image 1, Video 1, and Audio 1.
image
Type: string · Required: No · Nullable: No
First-frame image for keyframe mode. Cannot be combined with images, videos, or audios.
end_image
Type: string · Required: No · Nullable: No
Last-frame image for keyframe mode. May be sent with or without image, but cannot be combined with reference-mode fields.
images
Type: array · Required: No · Nullable: No
Reference-mode images. Up to 10; reference them in prompt as Image 1, Image 2, and so on.
videos
Type: array · Required: No · Nullable: No
Reference-mode videos. Up to 5 HTTPS URLs; reference them in prompt as Video 1, Video 2, and so on.
audios
Type: array · Required: No · Nullable: No
Reference-mode audio clips. Up to 5 HTTPS URLs; reference them in prompt as Audio 1, Audio 2, and so on.
audio_enable
Type: boolean · Required: No · Nullable: No
Whether to generate audio together with the video. Defaults to true.
duration
Type: integer · Required: No · Nullable: No
Video duration in seconds from 2 to 30, or -1 for smart duration.
resolution
Type: string · Required: No · Nullable: No
Output resolution. Accepts 480p, 720p, or 1080p case-insensitively; defaults to 1080p.
aspect_ratio
Type: string · Required: No · Nullable: No
Output aspect ratio. Defaults to adaptive; also supports 16:9, 4:3, 1:1, 3:4, and 9:16.
seed
Type: integer · Required: No · Nullable: No
Random seed from 0 to 2147483647 for reproducible output. Omit it for a random seed.
Request Example
curl --request POST \
--url https://aiapiaiapi.com/v1/video/generations \
--header 'Authorization: Bearer $AIAPIAIAPI_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "alibaba/wan-3.0-video",
"prompt": "A cinematic camera movement through a forest",
"duration": 5,
"resolution": "1080p"
}'JSON
{
"model": "alibaba/wan-3.0-video",
"prompt": "A cinematic camera movement through a forest",
"duration": 5,
"resolution": "1080p"
}Response
{
"id": "vid_01K2ABC123",
"object": "video.generation",
"model": "alibaba/wan-3.0-video",
"status": "queued",
"progress": null,
"outputs": [],
"created_at": 1786960800,
"started_at": null,
"completed_at": null,
"error": null
}Task Status
Use the id from the create response as task_id:
GET /v1/video/generations/{task_id}
{
"id": "vid_01K2ABC123",
"object": "video.generation",
"model": "alibaba/wan-3.0-video",
"status": "completed",
"progress": 100,
"outputs": [
{ "type": "video", "url": "https://cdn.example.com/videos/vid_01K2ABC123.mp4" }
],
"created_at": 1786960800,
"started_at": 1786960805,
"completed_at": 1786960900,
"error": null
}Error Responses
Validation errors return HTTP 400 with a stable error code.
{
"error": {
"type": "invalid_request_error",
"code": "unsupported_value",
"message": "The parameter value is not supported by this model.",
"param": "duration"
}
}Documentation Index
Fetch the complete documentation index at:
https://aiapiaiapi.com/llms.txt
Use this file to discover all available API documentation.