Wan 3.0 Video API
Parameters, media combinations, asynchronous tasks, downloads and per-second billing for wan3.0-video on APIMaster.
Wan 3.0 Video API
wan3.0-video is the standard Wan 3 model; it is a separate model from wan3.0-video-prime. It supports text, images, video, audio, documents and public web pages. Each successful task produces one MP4/H.264 video, up to 30 seconds. Integration reviewed: 2026-11-17.
Each request accepts at most 20 media items in total. Generated video uses 30 fps.
Endpoints and authentication
| Operation | Endpoint |
|---|---|
| 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 |
Authorization: Bearer YOUR_API_KEY · Content-Type: application/json
All request parameters
Use one media format per request. Use metadata.input.media for mixed reference media or documents.
| Parameter | Type | Required / default | Meaning and valid values |
|---|---|---|---|
model |
string | Required | Exactly wan3.0-video; do not substitute Prime |
prompt |
string | Required | Describe the result in Chinese or English; official limit 20,000 characters, longer native text is truncated. Refer to Image 1, Video 1, Audio 1 in media order; each media type has its own numbering |
duration |
integer | 5 |
2–30 output seconds; -1 lets the model select the duration. With reference video, input plus output duration cannot exceed 30 seconds |
seconds |
string | Optional | Duration alias, e.g. "5" or "-1"; must match duration when both are supplied |
resolution |
string | 1080P |
480P, 720P, 1080P; lowercase top-level values are normalized |
aspect_ratio |
string | adaptive |
adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 |
ratio |
string | Optional | Alias for aspect_ratio; adaptive is recommended for video extension |
size |
string | Optional | Compatibility alias: resolution tier, or a supported pixel mapping such as 1280x720; prefer explicit resolution and ratio, not arbitrary pixel sizes |
generate_audio |
boolean | true upstream |
Whether the output has an audio track. Explicit false is preserved. Audio does not change the per-second rate |
audio |
boolean | Optional | Alias for generate_audio; use one audio switch |
prompt_extend |
boolean | true |
Intelligent prompt rewriting; explicit false is preserved. Must be true for document/page input |
watermark |
boolean | false upstream |
Add an output watermark; explicit false is preserved |
seed |
integer | Random | -1 or 0–2147483647. Omission or -1 requests a random seed; 0 is forwarded. Repeated seeds do not guarantee identical output |
input_reference |
string | Optional | First-frame image URL; replaces the native media array. Do not mix input styles |
images |
string[] | Optional | Convenience array appended as reference_image items when input_reference is absent |
metadata |
object | Optional | Container for the native objects below; cannot change the selected model |
metadata.input |
object | Optional | Native input object |
metadata.input.prompt |
string | Optional | Native prompt override; retain the required top-level prompt |
metadata.input.media |
object[] | Optional | Ordered media array. Each item requires type and url; see limits below |
metadata.input.media[].type |
string | Required per item | first_frame, last_frame, reference_image, reference_video, reference_audio, file, link |
metadata.input.media[].url |
string | Required per item | Public HTTP(S) media URL; image types also accept a data:{MIME_type};base64,... string. Non-image media requires a public URL |
metadata.parameters |
object | Optional | Native parameter object; cannot be null |
metadata.parameters.resolution |
string | 1080P |
Uppercase 480P, 720P, 1080P |
metadata.parameters.ratio |
string | adaptive |
Same aspect-ratio values listed above |
metadata.parameters.duration |
integer | 5 |
2–30, or -1; same combined-duration constraint |
metadata.parameters.audio |
boolean | true upstream |
Same output audio switch |
metadata.parameters.prompt_extend |
boolean | true |
Same prompt rewriting switch; file/link requires true |
metadata.parameters.watermark |
boolean | false upstream |
Same watermark switch |
metadata.parameters.seed |
integer | Random | Same seed range, including explicit 0 |
The native negative_prompt, img_url, first_frame_url, last_frame_url, and audio_url fields are not Wan 3 media controls. Use the documented media array instead.
Media limits and valid combinations
| Media type | Count and constraints |
|---|---|
first_frame, last_frame |
At most one each. Last frame requires first frame. Frame controls cannot be combined with any reference, file or link type |
reference_image |
At most 10. JPEG/JPG, PNG without transparency, BMP or WEBP; each side 240–8,000 pixels, aspect ratio at most 8:1, each file at most 20 MB |
reference_video |
At most 5 MP4/MOV clips; each 1–15 seconds, combined input at most 15 seconds; at least 16 fps; each side 240–4,096 pixels, aspect ratio at most 8:1, each file at most 100 MB |
reference_audio |
At most 5 WAV/MP3 clips; each 1–15 seconds, combined at most 15 seconds; each file at most 15 MB |
file |
At most one DOCX/DOC/XLSX/XLS/PPTX/PPT/PDF/TXT/KEY/PAGES/NUMBERS/MD file; at most 100 MB. PDF, DOCX, DOC, PPTX, PPT and KEY/PAGES paged documents have a 50-page limit |
link |
At most one publicly accessible page without login; do not combine with file |
Reference images, video and audio may be combined. A file or link may accompany reference media. First/last frame mode accepts only frame controls; use reference-image plus reference-audio mode for audio-driven generation. Media parsing and content moderation remain subject to upstream checks.
Text-to-video uses a prompt without media. First-frame animation uses first_frame; transitions use first_frame plus last_frame. Reference generation uses the reference types. For editing or extension, supply reference_video and describe the edit or extension in the prompt; use adaptive for extension.
Examples
Text-to-video
curl "https://apimaster.ai/v1/videos" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"wan3.0-video","prompt":"A paper boat drifting on a quiet pond, static camera.","duration":2,"resolution":"480P","aspect_ratio":"16:9","generate_audio":false,"prompt_extend":false,"watermark":false,"seed":0}'
First and last frames
{"model":"wan3.0-video","prompt":"Move smoothly from the first frame to the last.","duration":5,"resolution":"720P","metadata":{"input":{"media":[{"type":"first_frame","url":"https://example.com/start.png"},{"type":"last_frame","url":"https://example.com/end.png"}]}}}
Reference image and audio
{"model":"wan3.0-video","prompt":"Animate Image 1 to the rhythm 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"}]}}}
Video editing / extension and smart duration
{"model":"wan3.0-video","prompt":"Extend Video 1 forward as the camera follows the paper boat.","duration":-1,"resolution":"480P","aspect_ratio":"adaptive","metadata":{"input":{"media":[{"type":"reference_video","url":"https://example.com/input.mp4"}]}}}
Document / web page
{"model":"wan3.0-video","prompt":"Create a product introduction based on this document.","duration":10,"resolution":"720P","prompt_extend":true,"metadata":{"input":{"media":[{"type":"file","url":"https://example.com/product.pdf"}]}}}
Replace all example URLs with real public media. For web input, replace the file item with {"type":"link","url":"https://example.com/product"}. The first-frame example also works without its last-frame item.
Responses, polling, downloads and logs
Creation returns an APIMaster task ID, not the upstream ID:
{"id":"task_example","task_id":"task_example","object":"video","model":"wan3.0-video","status":"queued"}
| Response field | Meaning |
|---|---|
id / task_id |
Platform task identifier used by query and download |
status |
queued, in_progress, completed, failed |
progress |
Progress indicator; wait for terminal status |
error.code, error.message |
Failure information when applicable |
metadata.url |
Content location when returned on completion |
Poll about every 15 seconds using the same API key. Do not create another task to check progress. The native provider's task IDs and output URLs expire after 24 hours; download and retain successful results promptly. APIMaster's authenticated content endpoint is preferred over storing temporary upstream URLs.
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 wan3.mp4
The usage log contains the task and successful video result. Check the final charge after completion; acceptance is not proof of generation success. Repeated polling does not create another generation fee.
Billing
See the per-second rates on the model card.
APIMaster adds the duration of every input video to the output video duration, rounds the total up once to a whole second, and multiplies it by the per-second rate for the selected output resolution. For example, 2.3 s of input and 5 s of output are billed as 8 s. With no input video, only output seconds are billed. Reference-video requests need no quote or input-duration field. Failed generations release the reservation. Check the usage log for the final charge.
Errors and corrections
| Symptom | Correction |
|---|---|
| Invalid duration/resolution/ratio | Use the enum and ranges above; smart duration is exactly -1 |
| Frame/reference conflict, last frame without first | Follow the combination rules |
| File/link plus disabled rewriting | Set prompt_extend:true |
| Media fetch/format/duration failure | Use public files that meet every size, format and duration constraint |
| Missing prompt | Retain a nonempty top-level prompt for the APIMaster API |
| Task failed or moderated | Inspect error, then correct the request; do not count acceptance as success |
