Skip to main content
POST
Create a Wan video from text, reference media, or first and last frames. Store the returned id to poll the task and download the completed video. POST /v1/videos uses multipart/form-data. Send an explicit integer seconds value and a size in WxH form. wan3.0-prime uses the same public request fields, media limits, and task flow as wan3.0. Set model to the exact value wan3.0-prime when targeting Prime. Prime supports text-to-video, image-to-video, first and last frame inputs, and combined image, video, and audio references. Reference media and frame inputs must be sent in separate requests.

Choose an input mode

Every mode requires model and prompt. The available media inputs depend on the model: To find a Wan model ID that is available to your API key, use List available models.

Create a Wan 3.0 Prime video

This minimal request creates a five-second text-to-video task with Prime:

Use reference images

For wan2.7, wan3.0, and wan3.0-prime, send reference images through input_reference as publicly accessible HTTPS URLs or uploaded files. For multiple images, repeat the field in image order, with one URL or file per field. Use all URLs or all files within input_reference. Send each URL separately rather than combining URLs into a comma-separated value. Use PNG or JPEG images up to 20 MB each. A single input_reference URL or file uses the image-to-video workflow. The image guides composition and appearance; use the prompt to describe motion and camera behavior. For wan3.0 and wan3.0-prime, send at most 10 reference images through input_reference, whether you use URLs or uploaded files.

Use reference videos and audio

Send videos through reference_videos and audio clips through reference_audios, repeating each field once per input. Each input can be a publicly accessible HTTPS URL or an uploaded file. Use MP4 files with H.264-encoded video for video references. Use separate MP3 files for audio references. Different fields can use different input types, such as an image URL with uploaded videos. Within reference_videos or reference_audios, use either all URLs or all files. You can upload up to five video files, each at most 50 MiB (50 × 1024 × 1024 bytes). You can upload up to five audio files, each at most 15 MiB (15 × 1024 × 1024 bytes).

Wan 2.6 video references

Send one to three reference_videos, each 2–30 seconds, up to 30 MB, and at least 16 fps. These limits apply to both URLs and uploaded videos. In the prompt, refer to subjects as @Video1, @Video2, and @Video3 in input order. For this mode, omit input_reference, reference_audios, first_frame, and last_frame. Set seconds to 5 or 10. These examples create a five-second video from two video references. Replace the media URLs or filenames with your inputs:

Wan 2.7 image and video references

Combine image and video references to guide subject appearance and motion. Set seconds to an integer from 2 through 10. Omit reference_audios. Use two image URLs or two uploaded images with a video reference:

Wan 3.0 image, video, and audio references

For wan3.0 and wan3.0-prime, combine image and video references with audio references to guide appearance, motion, and rhythm. Send at most five video references with a combined duration of at most 15 seconds. Each video must be at least 16 fps. Send at most five audio references with a combined duration of at most 15 seconds. Count video and audio duration separately. Set output seconds to an integer from 2 through 30. Use two image URLs or two uploaded images with one video and two audio clips:

Use first and last frames

For wan2.7, wan3.0, and wan3.0-prime, send first_frame for the opening image and optionally last_frame for the ending image. Each field accepts one publicly accessible HTTPS PNG or JPEG URL or one uploaded PNG or JPEG file. For Wan 2.7 frame inputs, the opening image determines the aspect ratio, while size selects the output resolution tier. Submit frame inputs in a separate request from input_reference, reference_videos, and reference_audios. These Wan 2.7 examples create a transition between opening and ending frames:
These Wan 3.0 and Wan 3.0 Prime examples create a transition between opening and ending frames:

Set duration and size

Send seconds as a whole number within the range for your model and input mode. Set size to one of the WxH values below for the target model. The Wan 3.0 size values also apply to wan3.0-prime.

Wan 3.0 size values

Wan 2.7 size values

Wan 2.6 size values

Task flow

1

Create the task

Send the multipart form request and store the returned id.
2

Poll the task

Call Retrieve a Wan video until status is completed, failed, or error.
3

Download the result

When the task is completed, call Retrieve Wan video content to download the MP4 file.

Authorizations

Authorization
string
header
required

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data
model
string
required

Wan model ID: wan2.6, wan2.7, wan3.0, or wan3.0-prime. Wan 3.0 and Wan 3.0 Prime use the same public request fields, task flow, and media limits; use the exact model ID wan3.0-prime when targeting Prime. Use wan2.6 for text or reference-video input. Use wan2.7 for text, image/video references, or frame inputs. Wan 3.0 and Wan 3.0 Prime also support reference audio.

Example:

"wan3.0-prime"

prompt
string
required

Text prompt that describes the video to generate. Describe the appearance and motion to preserve from references, or the transition between first_frame and last_frame. For wan2.6 video references, use @Video1, @Video2, and @Video3 in input order.

Example:

"A small robot walks through a bright greenhouse with smooth camera movement."

seconds
integer

Requested output duration in whole seconds. Send an explicit integer. For wan2.6 reference-to-video, use 5 or 10; text-to-video also accepts 15. For wan2.7 reference-to-video, use 2 through 10; text and frame inputs accept 2 through 15. For wan3.0 and wan3.0-prime, use 2 through 30. Default is 5.

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

5

size
string

Supported WxH size values. For wan3.0 and wan3.0-prime, 480p: 832x480, 480x832, 624x624, 704x528, 528x704; 720p: 1280x720, 720x1280, 960x960, 1088x832, 832x1088; 1080p: 1920x1080, 1080x1920, 1440x1440, 1632x1248, 1248x1632. For wan2.6: 1280x720, 720x1280, 1088x832, 832x1088, 1920x1080, 1080x1920, 1440x1440, 1632x1248, 1248x1632. For wan2.7: 1280x720, 720x1280, 1920x1080, 1080x1920, 1440x1440. Default is 1920x1080. For Wan 2.7 frame inputs, the opening image determines the aspect ratio; size selects the output resolution tier.

Example:

"1920x1080"

input_reference

PNG or JPEG reference images for wan2.7, wan3.0, and wan3.0-prime. Repeat input_reference with one publicly accessible HTTPS image URL or uploaded image file per field. Use all URLs or all files within this field. Do not combine URLs into a comma-separated value. A single URL or file uses the image-to-video workflow. Each image can be up to 20 MB. For wan3.0 and wan3.0-prime, send at most 10 reference images, whether you use URLs or uploaded files. Image and video references can share a request; reference audio requires wan3.0 or wan3.0-prime. Submit frame inputs separately. Omit for text-to-video and wan2.6 reference-to-video. Submit images in the order you want to reference them in the prompt.

Pattern: ^https://
reference_videos
(string<uri> | file)[]

Reference videos for wan2.6, wan2.7, wan3.0, and wan3.0-prime. Repeat reference_videos with publicly accessible HTTPS URLs or uploaded MP4 files with H.264 video. Use one input type within this field: all URLs or all files. For wan2.6, send 1 to 3 clips, each 2 to 30 seconds and up to 30 MB, with at least 16 fps; omit image, audio, and frame fields. For wan2.7, combine video references with image references. For wan3.0 and wan3.0-prime, send at most 5 clips totaling at most 15 seconds, with at least 16 fps. Video uploads are limited to 5 files, each at most 50 MiB (50 x 1024 x 1024 bytes); the lower wan2.6 limits still apply. Submit frame inputs separately.

Minimum array length: 1
Pattern: ^https://
reference_audios
(string<uri> | file)[]

Reference audio for wan3.0 and wan3.0-prime, combined with image or video references. Repeat reference_audios with publicly accessible HTTPS MP3 URLs or uploaded MP3 files. Use one input type within this field: all URLs or all files. Send at most 5 audio references totaling at most 15 seconds, counted separately from reference video duration. Audio uploads are limited to 5 files, each at most 15 MiB (15 x 1024 x 1024 bytes). Submit frame inputs separately. Omit for wan2.6 and wan2.7.

Minimum array length: 1
Pattern: ^https://
first_frame

Opening frame for wan2.7, wan3.0, and wan3.0-prime, as one publicly accessible HTTPS PNG or JPEG URL or one uploaded PNG or JPEG file. Use first_frame alone or add last_frame to guide the ending. Submit frame inputs in a separate request from input_reference, reference_videos, and reference_audios. Omit for wan2.6. For Wan 2.7 frame inputs, the opening image determines the aspect ratio; size selects the output resolution tier.

Pattern: ^https://
last_frame

Ending frame for wan2.7, wan3.0, and wan3.0-prime, as one publicly accessible HTTPS PNG or JPEG URL or one uploaded PNG or JPEG file. Use with first_frame to guide the ending. Submit frame inputs in a separate request from input_reference, reference_videos, and reference_audios. Omit for wan2.6. For Wan 2.7 frame inputs, the opening image determines the aspect ratio; size selects the output resolution tier.

Pattern: ^https://

Response

Task created. Store the returned id and poll GET /v1/videos/{task_id}.

id
string
required

Task ID. Use this value with retrieve and content endpoints.

Example:

"task_example"

object
string
required

Object type. Video tasks return video.

Example:

"video"

model
string
required

Model ID used for the task.

Example:

"wan3.0"

status
enum<string>
required

Task lifecycle status. Poll until the value is completed, failed, or error.

Available options:
queued,
in_progress,
completed,
failed,
error
Example:

"queued"

progress
integer
required

Task progress as a coarse percentage.

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

0

created_at
integer
required

Task creation time as a Unix timestamp in seconds.

Example:

1779938152

task_id
string

Compatibility alias for id when present.

Example:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

Example:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

Example:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Last modified on October 10, 2026