Documentation

Video Generation 3.0

Generate Wan 3.0 videos from text, frames, or reference media through the TokenByte API

POSThttps://api.tokenbyte.ai/v1/videos

Submit 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.

ModelSupported resolutions
w3.0-video480p, 720p, 1080p
w3.0-video-pro1080p, 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.mp4

Successful submission response:

{
  "id": "public-task-id",
  "object": "video",
  "model": "w3.0-video-pro",
  "status": "queued"
}

Parameters

ParameterTypeRequiredDescription
modelstringYesw3.0-video or w3.0-video-pro.
promptstringYesVideo generation prompt.
first_framestringNoPublic URL for the first-frame image.
last_framestringNoPublic URL for the last-frame image.
reference_imagesstring[]NoPublic reference-image URLs.
reference_videosstring[]NoPublic reference-video URLs.
reference_audiosstring[]NoPublic reference-audio URLs.
resolutionstringNoOutput resolution; supported values depend on the model and are case-sensitive.
durationnumberNo2–30 seconds; default 5.
ratiostringNoadaptive, 16:9, 4:3, 1:1, 3:4, or 9:16; default adaptive.
audiobooleanNoGenerate or preserve audio; an explicit false is forwarded upstream.
seedintegerNoRandom seed from 0 to 2147483647.
prompt_extendbooleanNoEnable prompt expansion; an explicit false is forwarded upstream.

On this page