Skip to main content
POST

Authorizations

Authorization
string
header
required

##All endpoints require Bearer Token authentication##

Get API Key:

Visit the API Key Management Page to obtain your API Key

Add to request header:

Body

application/json
model
enum<string>
default:wan3.0-text-to-video
required

Model name, fixed to wan3.0-text-to-video

Available options:
wan3.0-text-to-video
Example:

"wan3.0-text-to-video"

prompt
string
required

Text prompt for video generation. Chinese and English are supported, each Chinese character / letter counts as 1 character, maximum length 20000 characters; anything beyond that is truncated automatically (no error)

Note: this model is pure text-to-video and accepts no media input.

Example:

"A kitten runs across a rooftop in the moonlight, city neon flickers in the distance, cinematic quality, smooth camera work."

duration
integer
default:5

Duration of the generated video in seconds, defaults to 5

Accepted values:

  • Any integer between 2 and 30
  • -1: smart duration, the model decides the output length from the prompt and the input material

How smart duration is billed: the output length cannot be known at submission time, so credits are pre-authorized at the 30-second cap; once the task succeeds it is settled against the actual output duration and the excess hold is released automatically. If your balance cannot cover the capped hold, pass an explicit number of seconds instead.

Example:

5

quality
enum<string>
default:720p

Video resolution, defaults to 720p

Options:

  • 480p: lower definition, lowest price (billing baseline)
  • 720p: standard definition, this is the default, 2x the price of 480p
  • 1080p: high definition, 4x the price of 480p
Available options:
480p,
720p,
1080p
Example:

"720p"

aspect_ratio
enum<string>
default:adaptive

Video aspect ratio, defaults to adaptive

Options:

  • adaptive: adaptive, the model recommends a suitable aspect ratio based on the input material's ratio and the intent of the prompt, this is the default
  • 16:9 (landscape), 9:16 (portrait), 1:1 (square), 4:3, 3:4
Available options:
adaptive,
16:9,
9:16,
1:1,
4:3,
3:4
Example:

"16:9"

generate_audio
boolean
default:true

Whether the output video contains an audio track, defaults to true

Options:

  • true: the output video contains sound (voices, sound effects, background music), this is the default
  • false: silent video output

Sound on and sound off cost the same, there is no extra charge.

Example:

true

seed
integer

Random seed, used to reproduce generation results, random by default

Notes:

  • Range: 0 ~ 2147483647
  • Fixing the seed reduces variation when iterating on prompts and improves reproducibility
Required range: 0 <= x <= 2147483647
Example:

42

callback_url
string<uri>

HTTPS callback URL for task completion

Callback timing:

  • Triggered when the task is completed, failed, or cancelled
  • Sent after billing confirmation is complete

Security restrictions:

  • Only HTTPS protocol is supported
  • Callbacks to private IP addresses are prohibited (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
  • URL length must not exceed 2048 characters

Callback mechanism:

  • Timeout: 10 seconds
  • Up to 3 retries after failure (at 1/2/4 seconds after failure respectively)
  • Callback response body format is consistent with the task query endpoint response format
  • A 2xx status code is considered successful; other status codes trigger retries
Example:

"https://your-domain.com/webhooks/video-task-completed"

Response

Video generation task created successfully

created
integer

Task creation timestamp

Example:

1761313744

id
string

Task ID

Example:

"task-unified-1774857405-abc123"

model
string

Actual model name used

Example:

"wan3.0-text-to-video"

object
enum<string>

Specific task type

Available options:
video.generation.task
progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

task_info
object

Video task details

type
enum<string>

Task output type

Available options:
text,
image,
audio,
video
Example:

"video"

usage
object

Usage and billing information