Wan 3.0 (Tongyi Wanxiang) video generation (async): one endpoint, the parameters pick the mode — no material is text-to-video, one reference image is first-frame, two are first+last frame, more are multi-image reference, and a reference video makes it a video edit. duration is any integer 2-30 seconds, resolution 480P / 720P / 1080P (default 720P, each tier its own rate), size 16:9 / 9:16 / 1:1 / 4:3 / 3:4, and with a first frame you may pass size=adaptive so the output follows the reference image. Up to 10 reference images, 5 reference videos and 5 reference audio tracks (the latter two capped at 15s each in total). Returns a job id (HTTP 202); poll GET /v1/videos/jobs/{id} until status=succeeded, result in data[0].url (a re-hosted mp4). Billed per second on the output duration PLUS each reference video’s duration; reference images and audio are free. Fully refunded on failure.
Try in Playground →Authentication
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
Create an API Key in the console to start.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID, here wan3.0-video. |
| prompt | string | Yes | Text prompt describing the video, camera and motion. Max 5000 bytes (UTF-8; a Chinese character counts as 3). Address the reference material in order as @Image1 / @Video1 / @Audio1, e.g. "the character from @Image1 with the camera move of @Video1"; without tokens the model decides on its own. |
| duration | integer | No | Length in seconds, any integer 2-30 (default 2); alias seconds. Billed per second. |
| resolution | string | No | Resolution: 480P / 720P / 1080P (default 720P). Per second: 480P $0.09 / 720P $0.12 / 1080P $0.16. |
| size | string | No | Aspect ratio: 16:9 / 9:16 / 1:1 / 4:3 / 3:4 (default 16:9); alias aspect_ratio. With a first frame you may pass adaptive and the output follows the reference image’s own aspect. 21:9 is not available. |
| image | string | No | Image-to-video: a single reference image is used as the first frame by default (public URL, data: URI or base64); omit for text-to-video. |
| images | array | No | Multiple reference images, up to 10, free of charge. Two or more are treated as subject / scene references by default. Exceeding the cap is rejected, never truncated; alias reference_images. Note: every person visible in ANY reference is a candidate subject, so a scene reference is best kept free of other people. |
| image_role | string | No | How the reference images are used: first_frame (a second image becomes the last frame) or reference (subject / scene guides). Omitted: one image defaults to first_frame, two or more to reference. Alongside a reference video, reference is required. |
| video_references | array | No | Reference videos, up to 5, 15s in total. Write each as {"url": "...", "duration": 5}; duration is REQUIRED in seconds because reference-video seconds are billed alongside the output. Public http(s) links only; with a reference video, total reference + output must stay within 30s. May be combined with reference images. |
| audio_reference | string / array | No | Public http(s) URL(s) for reference audio, up to 5, 15s in total, free of charge. Must accompany a reference image or video. |
| prompt_extend | boolean | No | Official prompt rewriting. Left out, the upstream default (on) applies; pass false to keep a carefully written prompt exactly as you wrote it. |
Request example
# 1) submit -> 202 {"id":"img_...","status":"queued"}
curl https://nezhagate.com/v1/videos/generations -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"model": "wan3.0-video", "prompt": "a paper crane unfolding over a misty lake", "duration": 5, "resolution": "720P", "size": "16:9"}'
# image-to-video: also pass "image": "https://example.com/first-frame.png"
# 2) poll every ~15s until status=succeeded, then read data[0].url
curl https://nezhagate.com/v1/videos/jobs/img_3f9a...c2 -H 'Authorization: Bearer YOUR_API_KEY'Response
{
"id": "img_3f9a...c2",
"object": "video.generation.job",
"status": "queued",
"model": "wan3.0-video"
}Async video job (submit → poll)
One model; params pick the type: tier=lite/fast/quality, resolution=720p/1080p/4k (1080p/4k need quality), size=16:9/9:16, duration=4s/6s/8s; add an image param for image-to-video (first frame). Returns HTTP 202 + a job id; poll until status=succeeded, result in data[0].url (a re-hosted mp4, ~1-2 min).
curl https://nezhagate.com/v1/videos/generations -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' -d '{"model": "wan3.0-video", "prompt": "a cat surfing at sunset", "tier": "quality", "resolution": "1080p", "size": "16:9", "duration": "8s"}'{ "id": "img_3f9a...c2", "object": "video.generation.job", "status": "queued", "model": "wan3.0-video" }curl https://nezhagate.com/v1/videos/jobs/img_3f9a...c2 -H 'Authorization: Bearer YOUR_API_KEY'
{
"id": "img_3f9a...c2",
"object": "video.generation.job",
"status": "succeeded",
"model": "wan3.0-video",
"data": [{ "url": "https://img.nezhagate.com/i/9f86d081a8....mp4" }]
}Billed per second ($0.12/s x duration); the hold equals the settle exactly, and a failed or timed-out render is refunded in full automatically.
Error codes
| Code | Description |
|---|---|
| 401 | API Key missing or invalid |
| 402 | Insufficient balance or Key over quota |
| 400 | Unsupported model or parameter |
| 429 | Upstream rate limit |
| 502 | All upstream routes failed |