Video Generation 3.0
Generate Wan 3.0 videos from text, frames, or reference media through the TokenByte API
POST
https://api.tokenbyte.ai/v1/videosSubmit asynchronous Wan 3.0 video generation tasks. Create an API key in the console and select the wan-video key group before making a request.
Before you start
Image, video, and audio inputs must use publicly accessible URLs. resolution
values are case-sensitive.
| Model | Supported resolutions |
|---|---|
w3.0-video | 480p, 720p, 1080p |
w3.0-video-pro | 1080p, 2k, 4k |
duration accepts 2–30 seconds and defaults to 5.
Text to video
curl --request POST 'https://api.tokenbyte.ai/v1/videos' \
--header 'Authorization: Bearer sk-replace-with-your-key' \
--header 'Content-Type: application/json' \
--data '{
"model": "w3.0-video-pro",
"prompt": "A corgi runs through a futuristic neon city, cinematic camera movement, smooth and stable motion",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"audio": true,
"prompt_extend": true,
"seed": 123456
}'First-frame image to video
curl --request POST 'https://api.tokenbyte.ai/v1/videos' \
--header 'Authorization: Bearer sk-replace-with-your-key' \
--header 'Content-Type: application/json' \
--data '{
"model": "w3.0-video-pro",
"prompt": "The person turns naturally toward the camera with smooth, cinematic movement",
"first_frame": "https://example.com/first-frame.jpg",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"audio": true,
"prompt_extend": true
}'First and last frames
curl --request POST 'https://api.tokenbyte.ai/v1/videos' \
--header 'Authorization: Bearer sk-replace-with-your-key' \
--header 'Content-Type: application/json' \
--data '{
"model": "w3.0-video-pro",
"prompt": "Transition smoothly from daytime to night as the camera slowly moves forward",
"first_frame": "https://example.com/first-frame.jpg",
"last_frame": "https://example.com/last-frame.jpg",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"audio": false,
"prompt_extend": true
}'Reference media to video
curl --request POST 'https://api.tokenbyte.ai/v1/videos' \
--header 'Authorization: Bearer sk-replace-with-your-key' \
--header 'Content-Type: application/json' \
--data '{
"model": "w3.0-video-pro",
"prompt": "Keep the referenced character consistent and reproduce the action and camera rhythm",
"reference_images": ["https://example.com/person.jpg"],
"reference_videos": ["https://example.com/action.mp4"],
"reference_audios": ["https://example.com/background.mp3"],
"duration": 10,
"resolution": "1080p",
"ratio": "adaptive",
"audio": true,
"prompt_extend": true
}'Compatible images field
The first item in images becomes first_frame; the second becomes last_frame.
curl --request POST 'https://api.tokenbyte.ai/v1/videos' \
--header 'Authorization: Bearer sk-replace-with-your-key' \
--header 'Content-Type: application/json' \
--data '{
"model": "w3.0-video-pro",
"prompt": "Create a natural, smooth transition between the two scenes",
"images": [
"https://example.com/first-frame.jpg",
"https://example.com/last-frame.jpg"
],
"duration": 5,
"size": "1080p",
"ratio": "16:9"
}'Check a task and download the video
Save the id returned by the create request. Download the content after the task reaches completed.
curl --request GET 'https://api.tokenbyte.ai/v1/videos/TASK_ID' \
--header 'Authorization: Bearer sk-replace-with-your-key'
curl --location --request GET \
'https://api.tokenbyte.ai/v1/videos/TASK_ID/content' \
--header 'Authorization: Bearer sk-replace-with-your-key' \
--output result.mp4Successful submission response:
{
"id": "public-task-id",
"object": "video",
"model": "w3.0-video-pro",
"status": "queued"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | w3.0-video or w3.0-video-pro. |
prompt | string | Yes | Video generation prompt. |
first_frame | string | No | Public URL for the first-frame image. |
last_frame | string | No | Public URL for the last-frame image. |
reference_images | string[] | No | Public reference-image URLs. |
reference_videos | string[] | No | Public reference-video URLs. |
reference_audios | string[] | No | Public reference-audio URLs. |
resolution | string | No | Output resolution; supported values depend on the model and are case-sensitive. |
duration | number | No | 2–30 seconds; default 5. |
ratio | string | No | adaptive, 16:9, 4:3, 1:1, 3:4, or 9:16; default adaptive. |
audio | boolean | No | Generate or preserve audio; an explicit false is forwarded upstream. |
seed | integer | No | Random seed from 0 to 2147483647. |
prompt_extend | boolean | No | Enable prompt expansion; an explicit false is forwarded upstream. |