Wan 3.0 Video Generation
Wan 3.0 can generate video from text, a first frame or a first-and-last-frame pair, or image, video, and audio references. Both models accept the same parameters and support 480P, 720P, and 1080P outputs from 2 to 30 seconds long.
| Model | Version |
|---|---|
wan3.0-video | Standard |
wan3.0-video-prime | High-speed |
Create a job
Use a Nbility API key with access to the video group. Send it in the Authorization: Bearer header when creating, polling, and downloading a job.
export BASE_URL='https://api.nbility.ai'
export NBILITY_API_KEY='YOUR_NBILITY_API_KEY'
curl --fail-with-body -sS -X POST "${BASE_URL}/v1/videos" \
-H "Authorization: Bearer ${NBILITY_API_KEY}" \
-H 'Content-Type: application/json' \
--data-binary @- <<'JSON'
{
"model": "wan3.0-video",
"prompt": "A blue cube slowly rotates on a white background. Static camera.",
"size": "480P",
"seconds": "2",
"ratio": "16:9"
}
JSON
Set model to wan3.0-video-prime for the high-speed version. A successful create response means the job was accepted, not completed. Save the returned id, such as task_example.
Parameters and reference media
| Field | Description |
|---|---|
model | Required. Use one of the model IDs above. |
prompt | Required for text-to-video. Describe the subject, motion, and camera. When supplying a first frame, a prompt can describe how it should move. |
size | 480P, 720P, or 1080P (default). |
seconds | An integer from 2 to 30, optionally as a string. Defaults to 5. Use "-1" to let the model choose the duration. |
ratio | adaptive (default), 16:9, 9:16, 1:1, 4:3, or 3:4. 21:9 is not supported. |
image | Public HTTPS URL of the first-frame image. |
images | First- and last-frame URLs, in order. Use instead of image, not alongside it. |
metadata.input.media | Array of references, each with a type and url. Reference types include reference_image, reference_video, and reference_audio. |
Reference URLs must be directly downloadable and stay valid while the job runs. Do not mix first or last frames with reference media. If you include reference video, the total input video duration plus the output duration must not exceed 30 seconds.
For example, add these fields to the JSON request to reference a video. Replace the sample URL with your own:
{
"metadata": {
"input": {
"media": [
{ "type": "reference_video", "url": "https://example.com/reference.mp4" }
]
}
}
}
Poll and download
export TASK_ID='ID_FROM_CREATE_RESPONSE'
curl --fail-with-body -sS "${BASE_URL}/v1/videos/${TASK_ID}" \
-H "Authorization: Bearer ${NBILITY_API_KEY}"
Poll every 5–10 seconds. queued means waiting, in_progress means generating, completed means ready to download, and failed means the job ended unsuccessfully. Check error.message when present.
Once the job completes, download from the fixed content path. You do not need a url field in the status response:
curl --fail-with-body -sS "${BASE_URL}/v1/videos/${TASK_ID}/content" \
-H "Authorization: Bearer ${NBILITY_API_KEY}" \
-o wan3.mp4
Downloads support HTTP Range requests. Save completed videos promptly. If polling or downloading fails, check the job status, ID, API key, and error response before resubmitting; a second create request can create a second billable job. See API errors.
Billing
Both models are billed per second, not per token. Billable seconds = output video duration + total input reference video duration. Without reference video, only output seconds count. The output resolution determines the rate for both input and output. Image and audio references do not add input video seconds.
Automatic duration (seconds: "-1") or a reference video can trigger a 30-second reservation. Final billing uses the valid usage reported for the job. For example, a 4-second reference and a 6-second 720P output count as 10 seconds at the 720P rate. See the corresponding model pricing page above for current rates.