Skip to main content
POST
cURL

Billing Introduction

The credit rate is determined by the output video resolution. The total credit cost is calculated based on the output video’s duration. See the Billing Introduction for current credit rates.

File Storage Policy

Query Task

This API creates an asynchronous task. Save the returned task_id, then use Querying Async Task Results to retrieve its final result. Results remain available for 24 hours; wait at least 5 seconds between queries.
All result URLs are temporarily available and will expire after 24 hours.

Submit Task

Authorizations

ailabapi-api-key
string
header
required

API KEY for authentication. See Get API KEY.

Body

multipart/form-data

Choose one of the following input modes:

  • First-frame-to-video: provide first_frame.
  • First-and-last-frame-to-video: provide first_frame and last_frame.
  • Video continuation: provide first_clip. Provide exactly one of first_frame or first_clip. last_frame is ignored when first_clip is used.
model
enum<string>
required

Model.

Available options:
wan-27/image-to-video
Example:

"wan-27/image-to-video"

prompt
string
required

Prompt.

Required string length: 1 - 5000
Example:

"Bring the scene to life with gentle movement, natural lighting, and a slow cinematic camera pan."

first_frame
file
required

First frame image.

  • Supported formats: JPEG JPG PNG WEBP BMP
  • Maximum file size: No more than 20 MB.
  • Minimum resolution: 256 × 256 px.
  • Maximum resolution: 8000 × 8000 px.
  • Aspect ratio: From 1:8 to 8:1.
last_frame
file

Last frame image. Ignored when first_clip is used.

  • Supported formats: JPEG JPG PNG WEBP BMP
  • Maximum file size: No more than 20 MB.
  • Minimum resolution: 256 × 256 px.
  • Maximum resolution: 8000 × 8000 px.
  • Aspect ratio: From 1:8 to 8:1.
first_clip
file

First clip video, used for video continuation.

  • Supported formats: MP4 MOV.
  • Maximum file size: 100 MB.
  • Duration: 2–10 seconds.
driving_audio
file
  • Supported format: MP3 WAV.
  • Maximum file size: No more than 15 MB.
  • Duration: 2–30 seconds.
negative_prompt
string

Negative prompt.

Maximum string length: 500
Example:

"Blurry details, flickering, distorted shapes, abrupt camera movement."

resolution
enum<string>
default:720p

Output video resolution.

Available options:
720p,
1080p
duration
integer
default:5

Output video duration in seconds.

Required range: 2 <= x <= 15
seed
integer<int32>

Random seed. Using the same parameters and seed helps improve result reproducibility.

Required range: 0 <= x <= 2147483647
prompt_extend
boolean
default:true

Whether to enable intelligent prompt rewriting.

watermark
boolean
default:false

Whether to add an AI-generated watermark.

nsfw_checker
boolean
default:false

Whether to enable additional NSFW content filtering for model-generated results.

Response

request_id
string
required

Request ID for debugging.

log_id
string
required

Log ID for debugging.

error_detail
object
required
task_id
string
required

Task ID for querying Querying Async Task Results.