Skip to main content
POST
Create Wan Standard video task

Request parameters

Image to video

Set mode: "image_to_video" and add a required first frame and optional last frame:
All media inputs must be HTTPS URLs accessible for generation. Inline Base64 and asset IDs are unsupported on this API.

Reference to video

Use mode: "reference_to_video" with any combination of the reference arrays. Reference media are optional in this mode.
When reference videos are supplied, total input video duration + output video duration must not exceed 30 seconds. For example, 15 seconds of reference video allows at most 15 seconds of output; 10 seconds of reference video allows at most 20 seconds of output. Without video input, output may be up to 30 seconds. Audio duration does not count toward this video limit. Media limits apply to the actual media, including remotely hosted URLs. The generation service validates media and returns its specific rejection reason. GENGEN does not download inputs to inspect their duration. Use at most 20 reference materials in total. A document or page automatically enables prompt rewriting. Use either a document or a page in one request. Frames cannot be combined with reference arrays. Unknown asset, control and Wan option fields are rejected.

Response and billing

Prime task IDs begin with wan30prime:. Save the returned ID and retrieve the task. If acceptance is still being reconciled, keep polling the same ID. Do not submit a new generation to check progress. The wallet reserves the estimated cost before submission. Successful tasks are charged for provider-reported output video seconds plus the combined reference video seconds, using the model, resolution and price fixed when submitted. Images and audio references do not add video seconds. See Pricing for current customer prices. Failed and confirmed cancelled tasks release their reservation; pending tasks remain reserved. Repeat queries do not charge again. Invalid fields or incompatible modes return HTTP 400, insufficient balance returns 402, and temporary unavailability returns 503. Retrieve and cancel require the API key scope that owns the task. HTTP failures include error_code and an error message. When the provider gives a specific rejection reason, the message preserves that reason after redacting credentials. A successfully accepted task can still fail later; inspect failureReason when retrieving a failed task. Reference-video requests reserve up to min(output seconds + 15, 30) seconds of fees without downloading or probing the input. Final billing uses the provider-reported input-plus-output video seconds; unused reservation is released. Media validity is checked by the generation service. Rate-limit rejections are returned without automatic queuing or retry. Error responses retain the upstream error code, message and supplementary diagnostic details, with credentials redacted. An uncertain submission is never automatically submitted again. For pending tasks, poll the returned ID. The successful task detail includes usage with billable seconds and the applicable price row. See usage fields.

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
required
Available options:
wan-3.0,
wan-3.0-prime
prompt
string
required
Required string length: 1 - 12000
mode
enum<string>

Inferred from assets when omitted. Frames require image_to_video; reference arrays/document/page require reference_to_video.

Available options:
text_to_video,
image_to_video,
reference_to_video
assets
object
required if mode = image_to_video
controls
object
providerOptions
object

Response

Accepted. Save the public task ID and poll it.

id
string
required
Pattern: ^wan30(prime)?:[0-9a-f-]{36}$
model
enum<string>
required
Available options:
wan-3.0,
wan-3.0-prime
status
enum<string>
required
Available options:
pending,
processing,
succeeded,
failed,
cancelled
outputs
object
required
usage
object

Successful task detail. Billable seconds include the generated video and all reference video inputs.

createdAt
string<date-time>
failureReason
string