Wan 3.0 Video Prime API
Complete APIMaster request parameters, route differences, media constraints, asynchronous polling, downloads and billing for wan3.0-video-prime.
Wan 3.0 Video Prime API
Use wan3.0-video-prime through the APIMaster asynchronous video API. The current integration provides 480P / 720P / 1080P, 2–30 integer seconds, and one video per task. Parameter and integration review: 2026-10-26.
Endpoints and authentication
| Operation | Method and URL |
|---|---|
| Create | POST https://apimaster.ai/v1/videos |
| Query | GET https://apimaster.ai/v1/videos/{task_id} |
| Download | GET https://apimaster.ai/v1/videos/{task_id}/content |
Use Authorization: Bearer YOUR_API_KEY on every request and Content-Type: application/json when creating a task. Use an APIMaster API key, not an Alibaba Cloud key. APIMaster supplies the upstream asynchronous header; you do not need X-DashScope-Async.
The compatible creation endpoint /videos/generations returns a different response envelope; the examples below consistently use /videos.
Current route capabilities
Two integrations currently serve this model: the Alibaba Cloud native route and the GMI route. Advanced fields require the corresponding route; submitting a field does not select that route. Confirm which route your API key can access before using route-specific examples.
| Capability | Alibaba Cloud native | GMI |
|---|---|---|
| Text-to-video, first frame, first/last frames, reference images | Integrated | Integrated, with different media fields |
| Reference audio | metadata.input.media |
audio_url |
| Document / public web page | Native media fields are forwarded; not covered by the completed generation check | Unsupported |
| Reference video, editing, extension | Blocked before submission | Unsupported |
Automatic duration -1 |
Blocked | Blocked |
Aspect ratio 21:9 |
Accepted | Rejected |
| Explicit audio switch | generate_audio / audio |
Unsupported; omit these fields |
Disable prompt rewriting / fixed seed 0 |
Current serialization does not preserve prompt_extend: false or seed: 0; do not rely on them |
Explicit false and 0 are preserved |
A native-route 5-second 720P silent video completed, downloaded and decoded successfully in the 2026-10-24 acceptance check. Other media combinations are described from the adapter and official contract, rather than being presented as generation-tested combinations. Route availability and prices can change; see the model card.
Complete common request parameters
Send these fields at the top level. For the broadest compatibility, use explicit duration, resolution and aspect_ratio, a nonempty prompt of at most 5,000 characters, and omit route-specific options.
| Field | Type | Required / default | APIMaster behavior |
|---|---|---|---|
model |
string | Required | Exactly wan3.0-video-prime |
prompt |
string | Required on both routes | Nonempty, including image generation. GMI validates 1–5,000 characters; the native adapter requires nonempty text. The official native limit is 20,000; avoid relying on that higher limit across routes |
duration |
integer | 5 |
2–30 seconds; no -1, fractions or automatic duration |
seconds |
string | Optional | String alias, e.g. "5"; must agree with duration when both are supplied |
resolution |
string | 720P |
480P, 720P, 1080P; top-level lowercase values are normalized. This APIMaster default differs from the official native default |
aspect_ratio |
string | 16:9 |
Common values: adaptive, 16:9, 9:16, 1:1, 4:3, 3:4. 21:9 only on the native route |
ratio |
string | Optional | Alias of aspect_ratio; use one field and do not send conflicting values |
size |
string | Optional | Dimension alias such as 1280x720; route-specific validation applies. Prefer resolution and aspect_ratio. GMI requires the shorter side to match the resolution tier; native accepts only its supported dimension mappings |
input_reference |
string | Optional | First-frame image URL. Use a publicly downloadable HTTP(S) URL for cross-route compatibility; do not combine with other first-frame inputs |
prompt_extend |
boolean | Native true; GMI leaves provider default when omitted |
Prompt rewriting. Native currently cannot reliably disable it with false; GMI forwards an explicit boolean |
watermark |
boolean | Official native default false; GMI leaves provider default when omitted |
Watermark switch |
seed |
integer | Random when omitted | Portable fixed range: 1–2147483647. Native also accepts -1 for random; native 0 is omitted during serialization. GMI accepts 0–2147483647 and rejects -1. A fixed seed does not guarantee identical output |
The native dimension aliases are 832x480, 480x832, 1280x720, 720x1280, 1920x1080, and 1080x1920 for the usual landscape/portrait cases. Some square dimension mappings reduce to 1:1; other mapped dimensions may still fail aspect-ratio validation. Do not use size to request arbitrary dimensions.
Route-specific parameter tables
GMI fields
These are top-level fields in addition to the common table. The GMI adapter rejects unrecognized fields, including metadata, images, image_urls, audio, generate_audio, video_urls and reference_video.
| Field | Type | Required / default | Behavior |
|---|---|---|---|
negative_prompt |
string | Optional | At most 500 characters |
first_frame |
string | Optional | Public HTTP(S) image URL; alternative to input_reference |
last_frame |
string | Optional | Public HTTP(S) final-frame image URL; supply a first frame too |
reference_image |
string or string[] | Optional | 1–10 public HTTP(S) reference-image URLs; use an array for multiple images |
audio_url |
string | Optional | Public HTTP(S) reference-audio URL; subject to provider media validation |
Use either frame controls or reference images in one request. Native metadata.input.media is not translated into these fields on GMI.
Alibaba Cloud native fields
Native structured inputs belong inside metadata. Sending official input or parameters objects directly at the top level is not the APIMaster contract. Always retain the required top-level prompt.
| Field | Type | Required / default | Behavior |
|---|---|---|---|
generate_audio |
boolean | Official native default true |
Whether the output contains an audio track; false is preserved |
audio |
boolean | Optional | Alias of generate_audio; supply only one |
images |
string[] | Optional | Converted into reference_image media entries; these are not ordered first/last frames. Do not combine with input_reference |
metadata |
object | Optional | Wraps native input and parameters; cannot change model |
metadata.input |
object | Optional | Native input container |
metadata.input.prompt |
string | Optional | Native prompt override; prefer the top-level prompt alone |
metadata.input.media |
object[] | Optional | Native media collection, with type and url in every item |
metadata.input.media[].type |
string | Required per item | first_frame, last_frame, reference_image, reference_audio, file, link; reference_video is currently rejected |
metadata.input.media[].url |
string | Required per item | Media location; public HTTP(S) URLs are recommended. Official OSS temporary URLs require a separately valid upstream upload context; APIMaster does not provide that upload context |
metadata.parameters |
object | Optional | Native parameter container; must not be null |
metadata.parameters.resolution |
string | 720P |
Uppercase 480P, 720P, 1080P |
metadata.parameters.ratio |
string | 16:9 |
Native aspect ratios including adaptive and 21:9 |
metadata.parameters.duration |
integer | 5 |
2–30; no -1 |
metadata.parameters.audio |
boolean | Official native default true |
Output audio switch |
metadata.parameters.prompt_extend |
boolean | true |
Must remain true for file / link; explicit false has the serialization limitation above |
metadata.parameters.watermark |
boolean | Official native default false |
Watermark switch |
metadata.parameters.seed |
integer | Random | -1 or 0–2147483647; 0 has the serialization limitation above |
Top-level native options override their corresponding metadata parameters. Top-level input_reference replaces the native media array; images appends reference-image entries when input_reference is absent. Use one input style and one parameter style to avoid accidental overrides. Do not use legacy img_url, first_frame_url, last_frame_url or audio_url inside native input; the adapter rejects those legacy media fields for Wan 3.0.
Media constraints
The official native media rules below also explain provider-side validation; an adapter accepting a URL does not prove the media is valid.
| Media | Limits / integration notes |
|---|---|
| First / last frames | At most one each; a last frame requires a first frame. Do not mix frame controls with reference_image |
| Reference images | At most 10; JPEG/JPG, PNG without transparency, BMP or WEBP; each side 240–8,000 px, aspect ratio at most 8:1, at most 20 MB per image |
| Reference audio | Native: at most 5, WAV/MP3, each 1–15 seconds, combined at most 15 seconds, at most 15 MB per file. GMI exposes one audio_url |
| File / web page | Native only: at most one file or one publicly readable page; do not combine file and link. Official file formats: DOCX, DOC, XLSX, XLS, PPTX, PPT, PDF, TXT, KEY, PAGES, NUMBERS, MD; at most 100 MB, with a 50-page limit for applicable paged formats. Keep prompt_extend: true |
| Reference video | Officially available, but currently blocked by APIMaster native billing validation; not exposed on GMI. Do not use video editing or extension examples from the official API here |
The official native combined-media ceiling is 20 items; individual and combination limits still apply. Image Base64 data URLs are part of the official native input format, but are not accepted by GMI URL validation. Prefer downloadable HTTP(S) URLs across routes.
Examples
Text-to-video, common fields
curl "https://apimaster.ai/v1/videos" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"wan3.0-video-prime","prompt":"A paper boat drifting across a quiet pond at sunrise, gentle camera movement.","duration":5,"resolution":"720P","aspect_ratio":"16:9"}'
First frame, common fields
{"model":"wan3.0-video-prime","prompt":"The boat moves slowly forward, with soft ripples.","input_reference":"https://example.com/boat.png","duration":5,"resolution":"720P","aspect_ratio":"16:9"}
GMI first / last frames
{"model":"wan3.0-video-prime","prompt":"Move smoothly from the first frame to the last frame.","first_frame":"https://example.com/start.png","last_frame":"https://example.com/end.png","duration":5,"resolution":"720P","prompt_extend":false,"seed":0}
Native first / last frames and silent output
{"model":"wan3.0-video-prime","prompt":"Move smoothly from the first frame to the last frame.","duration":5,"resolution":"720P","generate_audio":false,"metadata":{"input":{"media":[{"type":"first_frame","url":"https://example.com/start.png"},{"type":"last_frame","url":"https://example.com/end.png"}]}}}
Native reference image and audio
{"model":"wan3.0-video-prime","prompt":"Animate the character in image 1, with the mood of audio 1.","duration":5,"resolution":"720P","metadata":{"input":{"media":[{"type":"reference_image","url":"https://example.com/character.png"},{"type":"reference_audio","url":"https://example.com/music.mp3"}]}}}
Replace example media URLs with real public files. Route-specific examples require the matching route and remain subject to upstream combination checks.
Response, polling and downloading
Creation returns an APIMaster task ID, for example:
{"id":"task_example","task_id":"task_example","object":"video","model":"wan3.0-video-prime","status":"queued"}
| Field | Meaning |
|---|---|
id / task_id |
APIMaster task identifier, not an upstream task identifier |
status |
queued, in_progress, completed, failed |
progress |
Reported progress; not a completion guarantee |
error.code / error.message |
Failure details when applicable |
metadata.url |
Authenticated content address when returned on completion |
Poll every 10–20 seconds with the same API key until a terminal status; creation success only means acceptance. Generation can take several minutes. Poll an accepted task instead of repeatedly creating paid tasks.
curl "https://apimaster.ai/v1/videos/task_example" -H "Authorization: Bearer YOUR_API_KEY"
curl -L "https://apimaster.ai/v1/videos/task_example/content" \
-H "Authorization: Bearer YOUR_API_KEY" -o wan-prime.mp4
Download and save the completed video promptly; upstream result URLs can expire. Repeated polling does not create another generation charge.
Billing and common errors
Billing is per second at the requested resolution, with route/account pricing shown on the model card. Submission reserves the estimated charge. Native completion uses the returned billable duration and the frozen submission price; GMI follows the reserved duration contract. Failed tasks release/refund their generation reservation. Audio off does not imply a cheaper tier. Use the usage log for the final amount.
| Error / symptom | Action |
|---|---|
duration must be an integer from 2 to 30 |
Use an explicit integer; -1 is not integrated |
unsupported Wan request field ... |
Remove a field unsupported by GMI or confirm access to the matching native route |
unsupported aspect ratio |
Use a common ratio; 21:9 requires native routing |
reference video requires an input-duration quote |
Remove reference video; this capability is currently blocked |
prompt is required / media fetch failure |
Add top-level text; use publicly downloadable, valid media |
prompt_extend: false or seed: 0 has no effect on native |
Current serialization limitation; use a positive seed and do not depend on disabling rewriting |
Sources: official model information, official native API reference, and official usage guide. Official capability does not mean the same field is exposed on every APIMaster route.
