1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/wan-2.2-i2v-flash";
const data = {
"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.",
"image": "https://segmind-resources.s3.amazonaws.com/output/310df0db-0c5e-4c5a-8c78-5db73fbc7c91-bcd49a2d-a0a9-465e-aefd-ca9b5ebb11a7.jpeg",
"negative_prompt": "Avoid depicting busy urban environments.",
"resolution": "720P",
"prompt_extend": true,
"watermark": false
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();Descriptive prompt guiding video generation with vivid storytelling.
Base image establishing the video's visual theme.
Elements to exclude from final video output.
Output quality. 720P for clarity, 480P for faster processing.
Allowed values:
Auto-enhances prompt for better results on complex descriptions.
Controls generation randomness. Set for consistency, blank for variation.
Adds AI Generated tag to output for content transparency.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Wan Image-to-Video is an image-guided video generation model designed to turn a single base image plus a text prompt into a short, coherent video. You provide the visual anchor (the image) and describe the motion, mood, camera behavior, and scene evolution in natural language. The model is especially strong at maintaining the theme and key objects from the input image while adding cinematic movement—making it a practical choice for developers building AI video generation, creative tools, product demos, or social content pipelines.
This model fits common developer searches like “image to video AI model”, “generate video from image and prompt”, and “API for AI video generation”, and is optimized for fast iteration with controllable randomness via seeds and quality selection via resolution.
seed for repeatable generations across runs.negative_prompt to remove distractions (extra objects, text overlays, chaotic backgrounds).prompt_extend for complex scenes or when prompts feel underspecified.seed when you need consistent outputs for A/B testing or multi-clip sequences.Is Wan Image-to-Video open-source?
No. It’s provided as a hosted generative video model.
What inputs are required?
prompt (text) and image (URI) are required. Other parameters are optional.
How is it different from text-to-video models?
It’s image-to-video: the image anchors identity and composition, improving consistency.
What parameters should I tweak first for best results?
Start with resolution, then refine negative_prompt, and set a seed for reproducibility.
When should I enable Prompt Extend?
Enable prompt_extend when scenes are complex, stylized, or when you want more descriptive detail automatically.
Can I add a watermark?
Yes—set watermark: true to include an “AI Generated” tag in outputs.