Wan 3.0

ModelNotes
wan3.0-videoStandard
wan3.0-video-primeFaster tier; same parameters as the standard model, different unit price

Wan 3.0 is one model for every mode: text to video, image to video (first frame / first + last frame), reference to video (any mix of reference images, videos and audio), video editing and extension, and document to video all call the same model — the assets in input.media[] decide the mode.

ModelGo accepts Wan 3.0 only on the official paths and request/response shapes of Alibaba Bailian's DashScope asynchronous video synthesis API: create → poll → fetch content. These two models are not offered on the OpenAI Video entrypoint; calling /v1/video/generations returns 400 model_protocol_not_offered.

With the official DashScope SDK, point base_url (DASHSCOPE_HTTP_BASE_URL) at https://api.modelgo.ai/api/v1 and use your ModelGo API key as api_key.

1. Create a task

POST https://api.modelgo.ai/api/v1/services/aigc/video-generation/video-synthesis, with the X-DashScope-Async: enable header.

bash
curl https://api.modelgo.ai/api/v1/services/aigc/video-generation/video-synthesis \
  -H "Authorization: Bearer $MODELGO_API_KEY" \
  -H "X-DashScope-Async: enable" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video",
    "input": {"prompt": "A fluffy orange kitten playing with a ball of yarn on a sunny windowsill"},
    "parameters": {"resolution": "720P", "duration": 5}
  }'

A successful create returns {"output": {"task_id": "gw_…", "task_status": "PENDING"}}. output.task_id is the gateway task ID used for polling and download.

Assets per mode

All assets go in input.media[] as {"type": ..., "url": ...} items. Their order is the numbering ("image 1 / video 1") your prompt refers to, and is passed upstream as written.

Modeinput.media[]
Text to videonone — input.prompt only
First-frame image to videofirst_frame
First + last frame image to videofirst_frame + last_frame
Reference to video / video editing / video extensionany mix of reference_image, reference_video, reference_audio
Document to videofile (a document) or link (a web page), one of the two

Reference example (a reference image + a reference video):

json
"input": {
  "prompt": "The person in image 1 holds a bouquet and walks toward the camera following the camera move in video 1",
  "media": [
    {"type": "reference_image", "url": "https://example-cdn.com/person.jpg"},
    {"type": "reference_video", "url": "https://example-cdn.com/walk.mp4"}
  ]
}

2. Parameters

FieldDescription
input.promptWhat happens in the video. Optional when input.media is given; omitting both returns 400
input.media[]See "Asset types and limits" below
input.negative_promptNegative prompt
parameters.resolution480P / 720P / 1080P, default 1080P
parameters.ratioadaptive (default, follows the assets) / 21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16; any other value returns 400. aspect_ratio is accepted too and must match ratio when both are given. Wan 3.0 has no size parameter
parameters.durationLength in seconds, default 5, range 2–30; -1 lets the model choose (2–30 s). With a video input, input plus output may not exceed 30 seconds
parameters.audioGenerate audio, default true. Does not affect the price
parameters.prompt_extendPrompt rewriting, default true; must be true for document to video (file / link)
parameters.watermark / seedWatermark (default false) / random seed

Asset types and limits

typeMax itemsNotes
first_frame1First-frame image
last_frame1Last-frame image; requires a first_frame
reference_image10Reference images
reference_video5Reference videos, 15 seconds in total at most
reference_audio5Reference audio, 15 seconds in total at most
file1A document (docx / pdf / pptx / md, …, up to 50 pages)
link1A web page URL
  • Combination rules: first_frame / last_frame cannot be combined with reference assets, file or link; file and link are mutually exclusive. Breaking a rule, exceeding a limit or an unlisted type returns 400 at create time, with no charge.
  • Wan 2.x spellings (input.img_url, input.last_frame_url, input.audio_url, …) are not accepted; use input.media[].
  • Reference asset lengths, document page counts and the duration range are validated upstream: a violation ends the task as FAILED, with no charge.

Asset URL requirements

Assets must be direct links the upstream can GET as-is: no auth, no redirects, no Referer / Cookie dependency. In link mode the upstream fetches the page content; a failed fetch fails the task (task_status=FAILED) with no charge. Your own object storage or CDN is recommended.

3. Poll the task

GET https://api.modelgo.ai/api/v1/tasks/{task_id}

bash
curl https://api.modelgo.ai/api/v1/tasks/gw_3d2eab09-bad9-44b1-913f-1ae8ce1645ee \
  -H "Authorization: Bearer $MODELGO_API_KEY"

When finished:

json
{
  "output": {
    "task_id": "gw_3d2eab09-bad9-44b1-913f-1ae8ce1645ee",
    "task_status": "SUCCEEDED",
    "video_url": "https://api.modelgo.ai/v1/videos/gw_3d2eab09-bad9-44b1-913f-1ae8ce1645ee/content"
  },
  "usage": {
    "video_count": 1,
    "duration": 5,
    "input_video_duration": 0,
    "output_video_duration": 5,
    "SR": 1080
  },
  "request_id": "gw_3d2eab09-bad9-44b1-913f-1ae8ce1645ee"
}
  • task_status: PENDING → RUNNING → SUCCEEDED / FAILED. On failure output.code / output.message explain why, and the task is not billed.
  • usage keeps the official fields: output_video_duration is the output length, input_video_duration the reference-video length, duration their sum, and SR the output resolution; some routes also return fps and ratio.
  • Generation usually takes 1–5 minutes (document to video takes longer). Poll every 5–10 seconds with backoff.
  • output.video_url points at the gateway content endpoint and needs no auth — the link itself is the credential; do not share or persist it.

4. Download the video

bash
curl https://api.modelgo.ai/v1/videos/gw_3d2eab09-bad9-44b1-913f-1ae8ce1645ee/content -o cat.mp4

Returns a video/mp4 byte stream with Range support; 409 while unfinished, 404 if expired or unknown.

5. Billing

  • Billed by output resolution tier (480P / 720P / 1080P) × seconds; unit prices are listed in the console Model List, and wan3.0-video-prime costs more than the standard model. The audio switch does not affect the price.
  • Output seconds are the delivered length (usage.output_video_duration).
  • With reference videos, their seconds (usage.input_video_duration) are billed at the same tier price; reference images and reference audio are free.
  • duration=-1 (model-chosen length) reserves 30 seconds of balance at create time and settles on the actual output seconds, refunding the rest.
  • Without resolution / duration, the defaults 1080P / 5 seconds are billed.
  • Rejected creates (400) and failed tasks (FAILED) are not billed.