Wan 2.6 Image To Video Serverless API

Wan 2.6 transforms text and images into high-quality videos with precise audio sync, perfect for engaging content creation.

~139.37s
$0.625 - $2.81 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/wan-2.6-i2v"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "image": "https://segmind-resources.s3.amazonaws.com/output/58c03b83-811d-4c4d-8837-1c01b8c8cdea-wan2.6-i2v-ip.webp",
12    "prompt": "A dramatic action POV chase scene. The camera shows the protagonist falling back on the wet ground, then quickly standing up and sprinting at high speed through heavy rain. The POV camera shakes violently with each step, with motion blur on the trees and bushes rushing past. Every few seconds, the character quickly turns their head, and the camera swings backward to reveal a massive T-Rex charging straight toward them. Mud explodes under its heavy footsteps, rain drips from its jaws, and it snaps its enormous teeth just behind the camera. Raindrops hit the lens, dirt and leaves splash upward, and flashes of lightning illuminate the dinosaur’s wet scales. The scene feels frantic, high-speed, hyper-realistic, and intensely cinematic",
13    "duration": 5,
14    "resolution": "720p",
15    "multi_shots": false,
16    "negative_prompt": "low resolution, error, worst quality, low quality, defects",
17    "enable_prompt_expansion": true
18}
19
20response = requests.post(url, headers=headers, json=data)
21
22if response.status_code == 200:
23    result = response.json()
24    print(json.dumps(result, indent=2))
25else:
26    print(f"Error: {response.status_code}")
27    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/wan-2.6-i2v

Parameters

imagerequired
string (uri)

Input image for video generation

promptrequired
string

Text prompt for video generation

audiooptional
string (uri)

Audio file (wav/mp3, 3-30s, ≤15MB) for voice/music synchronization

Default: null
durationoptional
integer

An enumeration.

Default: 5
Allowed values :
51015
enable_prompt_expansionoptional
boolean

If set to true, the prompt optimizer will be enabled

Default: true
multi_shotsoptional
boolean

Enable intelligent multi-shot segmentation (only active when enable_prompt_expansion is enabled). True enables multi-shot segmentation, false generates single-shot content.

Default: false
negative_promptoptional
string

Negative prompt to avoid certain elements

Default: ""
resolutionoptional
string

An enumeration.

Default: "720p"
Allowed values :
"720p""1080p"
seedoptional
integer

Random seed for reproducible generation

Default: null

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out