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 URL (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

Whether to add audio (optional, default true) Takes effect when audio_url is empty true: Automatically add audio to the 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 the video, achieving audio-visual synchronization 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 empty) When empty, uses the latest model version, future upgrades will apply 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 video The prompt parameter is ignored when using video effects (template)

Maximum string length: 2000
prompt_extend
boolean

Whether to enable smart prompt rewriting (optional, default true) When enabled, uses a large model to intelligently rewrite the input prompt

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 effects template name (optional) Prompt parameter is ignored when using effects Different models support different effects templates

watermark
boolean

Whether to add watermark (optional, default false) Watermark is placed in the bottom-right corner with fixed text "AI Generated"

Response

OK

task_id
string
required

Task ID

Example:

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