Skip to main content
POST
/
generate
/
bailian
/
wan2-image-to-video
Tongyi Wanxiang Wan2 Image-to-Video
curl --request POST \
  --url https://api.sinancode.com/v1/generate/bailian/wan2-image-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "image_url": "https://media.sinancode.com/uploads/20251217/a6aa177e82d58f6738109807a0548605.webp",
  "audio": true,
  "audio_url": "<string>",
  "duration": 5,
  "model": "wan2.6-i2v",
  "negative_prompt": "<string>",
  "prompt": "<string>",
  "prompt_extend": true,
  "resolution": "720P",
  "seed": 1073741823,
  "shot_type": "single",
  "template": "<string>",
  "watermark": true
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate smooth videos from a first-frame image using Alibaba Cloud’s Tongyi Wanxiang Wan2.6 model. Key Features:
  • First-Frame Driven - Generate coherent dynamic videos from a first-frame image
  • Smart Audio - Support automatic audio generation or custom audio sync
  • Multi-Resolution - Support 720P, 1080P HD output
  • Flexible Duration - Support 5/10/15 second video generation
  • Multi-Shot Mode - Support single and multi-shot modes with subject consistency

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

image_url
string
required

First frame image URL (required) Supports public URLs (HTTP/HTTPS) or Base64 encoding Image format: JPEG, JPG, PNG (no transparency), BMP, WEBP Image resolution: width and height range [360, 2000] pixels File size: max 10MB

Example:

"https://media.sinancode.com/uploads/20251217/a6aa177e82d58f6738109807a0548605.webp"

audio
boolean

Add audio (optional, default true) Takes effect when audio_url is empty true: automatically add audio to video false: no audio, output silent video

audio_url
string

Audio file URL (optional, only supported by wan2.5-i2v-preview) The model will use this audio to generate video with audio-visual sync Format: wav, mp3, duration: 3-30s, file size: max 15MB

duration
enum<integer>

Video duration (optional, default 5 seconds) wan2.6-i2v: available values are 5, 10, 15

Available options:
5,
10,
15
model
enum<string>

Model name (optional, recommended to leave blank) When left blank, the latest version will be used and future upgrades will be applied automatically Current default: wan2.6-i2v

Available options:
wan2.6-i2v
negative_prompt
string

Negative prompt (optional, max 500 characters) Describe content you don't want to see in the video

Maximum string length: 500
prompt
string

Text prompt (optional, max 2000 characters) Describe the elements and visual features you want in the generated image When using video effect parameters (template), the prompt parameter is invalid

Maximum string length: 2000
prompt_extend
boolean

Enable smart prompt rewriting (optional, default true) When enabled, uses large language model to intelligently rewrite input prompts

resolution
enum<string>

Resolution tier (optional, default 1080P) wan2.6-i2v: available values 720P, 1080P (480P not supported)

Available options:
720P,
1080P
seed
integer

Random seed (optional, range 0-2147483647)

Required range: 0 <= x <= 2147483647
shot_type
enum<string>

Shot type (optional, default single, only supported by wan2.6-i2v) Only takes effect when prompt_extend=true single: single-shot video multi: multi-shot video (supports multiple shot transitions while maintaining subject consistency)

Available options:
single,
multi
template
string

Video effect template name (optional) Prompt parameter is invalid when using effects Different models support different effect templates

watermark
boolean

Add watermark (optional, default false) Watermark is located at bottom right corner with fixed text "AI Generated"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"