Submit a Wan 3.0 video task

Generate video with Wan 3.0 All-in-One using text, images, or references. Supports up to 30 seconds at 30 fps.

POST /v1/videos/generations

Auth: Bearer sk-xxx

Wan 3.0 is an all-in-one reference video generation model, supporting text-to-video, image-to-video, and reference-to-video generation, up to 30 seconds, output at 30fps. asynchronous submission: after `POST /v1/videos/generations` is successfully accepted, returns top-level `id`; use the same API key to call `GET /v1/videos/generations/{id}` for query. Save `id` and query the original task to avoid duplicate submissions. Request body does not support `wait=true`; URL query parameters with `wait` are also unsupported; polling the original task is required. ## request parameters Wan3's generation parameters are placed in `parameters`, for example `parameters.duration` and `parameters.resolution`. The server uses these nested values to estimate quotas; the top-level `duration` and `resolution` are optional fields for backward compatibility. If both are provided, the nested values take precedence; it is recommended to only provide nested parameters to avoid conflicts. `input.prompt` describes the scene, while `input.media` provides reference materials such as images or videos. Reference videos use `input.media`'s `type=reference_video`; both the legacy general entry and the original Wan entry support this type. The input reference video and output video are charged together, with actual usage shown in the completed task response's `usage.duration` and output resolution. `parameters.duration` indicates the expected output duration, which does not represent the total billing duration. ## Available models `wan3.0-video` is the standard version. A response with `status=submitted` indicates the task has been accepted; after generation, query the response for `status=succeeded`, with the result URL located at `output.video_url`

Request body

modelstringrequiredModel ID, fixed as `wan3.0-video`
durationintegerOptional top-level duration for backward compatibility; Wan3 prioritizes `parameters.duration` for quota estimation and generation. It is recommended to only provide nested values.
resolutionstringOptional top-level resolution for backward compatibility; Wan3 prioritizes `parameters.resolution` for quota estimation and generation. It is recommended to only provide nested values.
inputobjectrequiredGeneration input (passed directly to the model). Sub-fields are detailed below in `input.*`
input.promptstringVideo content description; at least one of `input.media` must be provided. Maximum of 20000 characters.
input.mediaarrayArray of reference materials; at least one of `input.prompt` must be provided. Each item contains `type` and `url`; the purpose of the materials is described below.
input.media[].typestringMaterial purpose: first frame `first_frame`, last frame `last_frame`; or `reference_image`, `reference_video`, `reference_audio`, `file`, `link`. First and last frames cannot be mixed with other reference types.
input.media[].urlstringA publicly readable material URL; images can also be provided using a formatted image data URI.
parametersobjectGeneration parameters (passed directly to the model). Subfields are described below `parameters.*`
parameters.resolutionstringOutput resolution: `480P` / `720P` / `1080P`, omitted default `1080P`; it is recommended to explicitly specify this value, matching the one used for quota estimation.
parameters.durationintegerOutput duration (in seconds), can be set to 2–30 or -1 for intelligent duration; default 5. This value is also used for pre-estimating quota before submission.
parameters.ratiostringAspect ratio. `adaptive` indicates adaptive sizing by the model based on input content (recommended). Alternatively, specify ratios such as `16:9` / `9:16` / `1:1`
parameters.seedintegerRandom seed used for reproducing the generation result. Range: `[0, 2147483647]`
parameters.prompt_extendbooleanWhether to enable prompt intelligent rewriting. When enabled, the large model will intelligently expand the prompt, significantly improving generation quality for short prompts, though at the cost of increased processing time. Default: `true`
parameters.audiobooleanWhether to generate synchronized audio
parameters.watermarkbooleanWhether to add watermark. Default: `false`

Responses

Example

curl --request POST 'https://api.router.ai/v1/videos/generations' \
  -H "Authorization: Bearer $ROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
    "model": "wan3.0-video",
    "input": {"prompt": "虚构示例:一只纸船缓缓驶过静止的蓝色湖面。"},
    "parameters": {"resolution": "480P", "duration": 2, "ratio": "adaptive"}
  }'

## Image-to-video example ```json { "model": "wan3.0-video", "input": { "prompt": "镜头缓缓推进,人物转头微笑", "media": [ { "type": "first_frame", "url": "https://example.com/first-frame.jpg" } ] }, "parameters": { "resolution": "720P", "duration": 5, "ratio": "adaptive" } } ``` ## Reference-to-video example `input.media` supports mixed input of images, videos, audio, files, and web links. The model automatically interprets the content of the materials: ```json { "model": "wan3.0-video", "input": { "prompt": "根据参考素材生成产品宣传片", "media": [ { "type": "reference_image", "url": "https://example.com/product.jpg" }, { "type": "file", "url": "https://example.com/brief.pptx" } ] }, "parameters": { "resolution": "720P", "duration": 10, "ratio": "adaptive", "prompt_extend": true } } ``` ## Reference video: 480P, output 2 seconds The following are fictional URL addresses; please replace them with publicly accessible video URLs. After successful submission, use the top-level `id` to query the original task. Do not resubmit. ```json { "model": "wan3.0-video", "input": { "prompt": "参考视频中的圆点沿原方向移动,纯色背景,无文字", "media": [ {"type": "reference_video", "url": "https://example.com/reference-video.mp4"} ] }, "parameters": {"resolution": "480P", "duration": 2, "audio": false} } ``` Here, 2 seconds refers to the output duration. The actual billing duration of the reference video is provided by the Bailing success result and cannot be replaced by the 2 seconds from the request for total billing duration. ## Query result After successful submission, use the returned top-level `id` to poll: ```bash curl https://api.router.ai/v1/videos/generations/TASK_ID \ -H "Authorization: Bearer $ROUTER_API_KEY" ``` When the task is complete (`status` is `succeeded`), the response will include a video download link. It is recommended to poll every 5–10 seconds. ## Frequently Asked Questions - **More specific prompts yield better results**: Include subject, actions, camera movement, lighting, and style descriptions - **`prompt_extend` is enabled by default**: Short prompts are intelligently expanded. If you want strict adherence to the original text, set it to `false` - **Duration and resolution affect costs**: Higher resolution and longer duration result in higher costs. See the model marketplace for exact pricing ## Response for completed tasks The following field structure has been verified against the read-only query of existing general Wan3 tasks. All example values are fictional. `output` and `usage` appear after task completion. During processing, continue querying via the top-level `status` ```json { "request_id": "example-request-id", "output": { "task_id": "example-task-id", "task_status": "SUCCEEDED", "submit_time": "2000-01-01 00:00:00.000", "scheduled_time": "2000-01-01 00:00:01.000", "end_time": "2000-01-01 00:00:30.000", "orig_prompt": "这是一条虚构的视频提示词,仅用于说明响应格式。", "video_url": "https://example.com/generated-example.mp4" }, "usage": { "video_count": 1, "duration": 5.0, "input_video_duration": 0.0, "output_video_duration": 5.0, "fps": 30, "SR": 720, "ratio": "16:9" }, "id": "example-task-id", "model": "wan3.0-video", "status": "succeeded", "created_at": 946656000, "error": null } ```

API reference