Wan 2.2 Image to Video Flash Serverless API

Convert a single image into a coherent dynamic video.

~66.59s
$0.075 - $0.180 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/wan-2.2-i2v-flash"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "4K cinematic close-up of a bloodied, battle-worn Viking warrior kneeling in a snowy sacred cave, eyes wide and glassy with intensity.His long braided blonde beard is frosted with snow, blood streaks run down his face and shoulders. The background is dimly lit by a flickering flame behind him — ancient carvings and symbols glow faintly on the icy stone wall. Camera slowly pushes in on his face as snow swirls in slow motion, and he breathes heavily, lips slightly parted.Suddenly, subtle glitch effects ripple across his face — like time distorting — as if a divine force is entering his mind.In the distance, an echo of a woman’s voice is heard whispering prophecy. As his eyes narrow, a faint blue rune glow reflects in his iris, foreshadowing something ancient and powerful.The camera holds as his expression changes — from fear… to understanding… to resolve.",
12    "image": "https://segmind-resources.s3.amazonaws.com/output/310df0db-0c5e-4c5a-8c78-5db73fbc7c91-bcd49a2d-a0a9-465e-aefd-ca9b5ebb11a7.jpeg",
13    "negative_prompt": "Avoid depicting busy urban environments.",
14    "resolution": "720P",
15    "prompt_extend": true,
16    "watermark": false
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22    result = response.json()
23    print(json.dumps(result, indent=2))
24else:
25    print(f"Error: {response.status_code}")
26    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/wan-2.2-i2v-flash

Parameters

imagerequired
string (uri)

Base image establishing the video's visual theme.

promptrequired
string

Descriptive prompt guiding video generation with vivid storytelling.

negative_promptoptional
string

Elements to exclude from final video output.

Default: "Avoid depicting busy urban environments."
prompt_extendoptional
boolean

Auto-enhances prompt for better results on complex descriptions.

Default: true
resolutionoptional
string

Output quality. 720P for clarity, 480P for faster processing.

Default: "720P"
Allowed values :
"480P""720P"
seedoptional
integer

Controls generation randomness. Set for consistency, blank for variation.

Default: null
watermarkoptional
boolean

Adds AI Generated tag to output for content transparency.

Default: false

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