POST
javascript
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); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Descriptive prompt guiding video generation with vivid storytelling.


imagestr *

Base image establishing the video's visual theme.


negative_promptstr ( default: Avoid depicting busy urban environments. )

Elements to exclude from final video output.


resolutionenum:str ( default: 720P ) Affects Pricing

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

Allowed values:


prompt_extendbool ( default: true )

Auto-enhances prompt for better results on complex descriptions.


seedint ( default: 1 )

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


watermarkbool ( default: 1 )

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: Generative Video Model

What is Wan Image-to-Video?

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.

Key Features

  • Image-conditioned generation: uses the input image to preserve composition, characters, and style.
  • Prompt-driven motion: describe actions, transitions, lighting changes, and camera moves.
  • Negative prompts (optional): exclude unwanted elements for cleaner output.
  • Resolution control: choose 480P (faster) or 720P (higher clarity).
  • Prompt Extend: optional automatic prompt enhancement for richer, more consistent results.
  • Seeded reproducibility: set seed for repeatable generations across runs.
  • Optional watermarking: add an “AI Generated” tag for disclosure workflows.

Best Use Cases

  • Marketing & social: animate product shots, posters, and key visuals into short videos.
  • E-commerce: create dynamic hero media from catalog imagery (e.g., subtle rotations, lighting shifts).
  • Gaming & entertainment: concept art → animated teasers, scene reveals, environment fly-throughs.
  • Design prototyping: rapid motion studies and storyboards from static frames.
  • Education: visualize scenarios from diagrams or illustrations with guided narration cues.

Prompt Tips and Output Quality

  • Start with a strong base image (clear subject, good contrast, distinctive elements).
  • Write prompts that specify motion + camera + atmosphere:
    “Slow dolly-in, gentle wind moving foliage, soft volumetric twilight light, cinematic depth of field.”
  • Use negative_prompt to remove distractions (extra objects, text overlays, chaotic backgrounds).
  • Pick 720P for detail-sensitive scenes; use 480P for faster iteration during prompt tuning.
  • Enable prompt_extend for complex scenes or when prompts feel underspecified.
  • Set seed when you need consistent outputs for A/B testing or multi-clip sequences.

FAQs

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.