Skip to main content
POST
Wan 3.0 Spark — image to video

Authorizations

Authorization
string
header
required

Your API key from the developer console, sent as Authorization: Bearer sk_live_.... The x-api-key: sk_live_... header is accepted as an alternative.

Headers

Idempotency-Key
string

Optional key that makes the request safe to retry: any string up to 128 characters, unique per account, kept for 24 hours. The same key with the same body replays the first answer (Idempotent-Replayed: true) instead of creating a second task. See Idempotency.

Maximum string length: 128
Example:

"order-8812-attempt-1"

Body

application/json
image_url
string<uri>
required

Public HTTPS URL of a JPG, PNG or WebP image, 360–2,000 px per side, at most 20 MB.

Example:

"https://assets.example.com/inputs/street-market.png"

duration
integer
required

Video length in seconds.

Required range: 2 <= x <= 30
Example:

5

resolution
enum<string>
required

Output resolution.

Available options:
480p,
720p,
1080p
Example:

"720p"

prompt
string

Optional. How to animate the image: motion, camera movement, mood, sound.

Maximum string length: 2000
Example:

"camera drifts right through the market, vendors call out, cloth awnings sway"

negative_prompt
string

What to keep out of the video.

Maximum string length: 2000
aspect_ratio
enum<string>
default:adaptive

adaptive keeps the aspect ratio of the image; any other value crops to that ratio.

Available options:
adaptive,
9:16,
16:9,
1:1,
3:4,
4:3
generate_audio
boolean
default:false

Generate synchronized audio together with the video.

prompt_expansion
enum<string>
default:advanced

How much the prompt is rewritten before generation: none keeps your text, basic polishes it, advanced expands it into a detailed shot description. The final text is returned as output.actual_prompt.

Available options:
none,
basic,
advanced
seed
integer

Fixed seed for more reproducible results. Omit it for a random seed.

Example:

1733921

webhook_url
string<uri>

Public HTTPS URL that receives this task's events. Overrides your account's default webhook endpoint.

Example:

"https://hooks.example.com/fiveapi"

metadata
object

Your own JSON, up to 4,096 bytes when serialized. Returned unchanged on the task and in every webhook.

Example:

Response

The task was accepted and queued.

A generation task. error is always present (null unless the task failed); other empty members are omitted.

id
string
required

Task id, task_ followed by 26 characters.

Example:

"task_01J9X7Z0K7Q8W3F2P1N6M5V4R3"

object
string
required
Allowed value: "task"
model
string
required

The model id the task was created with.

Example:

"wan/v3.0-spark/image-to-video"

task
enum<string>
required

The task type, the last segment of the model id.

Available options:
text-to-video,
image-to-video,
reference-to-video,
video-extend
status
enum<string>
required

queued → processing → one of the terminal states completed, failed, cancelled.

Available options:
queued,
processing,
completed,
failed,
cancelled
input
object
required

The accepted request body, without webhook_url and metadata.

error
object | null
required

Why the task failed. null unless status is failed.

credits
object
required
created_at
string<date-time>
required

When the task was created.

output
object

The result. Present on completed tasks until expires_at.

queue
object

Present while the task is queued.

webhook_url
string<uri>

The webhook URL sent with the task.

metadata
object

The metadata sent with the task.

started_at
string<date-time>

When generation started.

completed_at
string<date-time>

When the task reached completed, failed or cancelled.

expires_at
string<date-time>

When the output is removed, 7 days after completion.