Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create a Wan video task. Parameters are narrowed according to the current Tikway gateway capabilities; for differences between models, see operation description and x-model-capabilities.

model
enum<string>
required

Wan model ID.

Available options:
wan-3.0,
wan3.0-video,
wan-2.7,
wan-2.6
prompt
string

Video generation or editing prompt words.

Minimum string length: 1
negative_prompt
string

Wan 2.6/2.7 available. Wan 3.0 does not support top-level negative_prompt; if the upstream extension supports it, please put extra_body.

size
string

Only wan-2.6 supports precise pixel dimensions; use resolution + aspect_ratio for other Wan models.

Pattern: ^[1-9][0-9]*[x*][1-9][0-9]*$
duration

Video duration (seconds). Wan 3.0 is 2–30 or -1; the upper limit of Wan 2.7/2.6 changes with the generation mode, see the model capability table for details.

Required range: -1 <= x <= 30
aspect_ratio
enum<string>

Video aspect ratio. When producing videos, some models will automatically determine the proportions based on the input material.

Available options:
adaptive,
16:9,
9:16,
1:1,
4:3,
3:4
resolution
enum<string>

Output resolution. Available values ​​for different models or modes are shown in the model capabilities table.

Available options:
480p,
720p,
1080p
frame_images
object[]

The first frame or the last frame reference picture; at most one of the same type.

Maximum array length: 2
input_references
object[]

Wan reference material. Different models and modes have different quantity limits; the reference material of Wan 3.0 cannot be mixed with the first and last frames, and file and link are mutually exclusive.

Maximum array length: 21
generate_audio
boolean

Whether to generate audio. Wan 3.0 is enabled by default; the specific behavior of Wan 2.6/2.7 is determined by the mode.

seed
integer

Random seed. Fixed seeds can only improve reproducibility, but do not guarantee that the output will be completely consistent.

Required range: -1 <= x <= 2147483647
callback_url
string<uri>

User task callback address. Called by Tikway after the task status changes, it is not directly passed to the model upstream.

Pattern: ^https://
extra_body
object

Alibaba Cloud Bailian video model expansion parameters. Fields are merged into upstream parameters.

Response

202 - application/json

POST /v1/videos Response parameters after the video task is successfully created. The interface returns HTTP 202.

id
string
required

The unique identifier of the video generation task, used for subsequent query of task status.

Minimum string length: 1
Example:

"9552de3d-171f-4cca-b492-7baa56523239"

status
enum<string>
required

Task creation status. pending means that the task has been created and is waiting for submission; queue means that the task has entered the generation queue.

Available options:
pending,
queue
Example:

"queue"

polling_url
string<uri>
required

Video task query address, the client can poll the task status through GET request.

Pattern: ^https://
Example:

"https://api.example.com/v1/videos/9552de3d-171f-4cca-b492-7baa56523239"