# Wan 2.6 Image To Video > Wan 2.6 transforms text and images into high-quality videos with precise audio sync, perfect for engaging content creation. ## Overview - **Endpoint**: `https://api.segmind.com/v1/wan-2.6-i2v` - **Model ID**: `wan-2.6-i2v` - **Category**: Image-to-Video Generation - **Type**: Synchronous (Direct response) - **Average Cost**: $1.4583333333333333 ## Pricing | resolution | duration | cost | | --- | --- | --- | | 720p | 5 | 0.625 | | 720p | 10 | 1.25 | | 720p | 15 | 1.875 | | 1080p | 5 | 0.9375 | | 1080p | 10 | 1.875 | | 1080p | 15 | 2.8125 | ## API Information This model uses a **synchronous response pattern**: 1. Make a POST request with your parameters 2. Receive the output directly in the response (binary for images/videos/audio, JSON for text) 3. No polling required - response is immediate ### Input Schema The API accepts the following input parameters: - **`seed`** (`integer | null`, _optional_): Seed Random seed for reproducible generation - **`audio`** (`File (URL)`, _optional_): Audio Audio file (wav/mp3, 3-30s, ≤15MB) for voice/music synchronization - **`image`** (`File (URL)`, _required_): Image Input image for video generation - **`prompt`** (`string`, _required_): Prompt Text prompt for video generation - **`duration`** (`integer | null`, _optional_): Duration An enumeration. - Default: `5` - Options: "5" (5), "10" (10), "15" (15) - **`resolution`** (`string | null`, _optional_): Resolution An enumeration. - Default: `"720p"` - Options: "720p" (720p), "1080p" (1080p) - **`multi_shots`** (`boolean | null`, _optional_): Multi shots 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_prompt`** (`string | null`, _optional_): Negative prompt Negative prompt to avoid certain elements - Default: `""` - **`enable_prompt_expansion`** (`boolean | null`, _optional_): Enable prompt expansion If set to true, the prompt optimizer will be enabled - Default: `true` **Required Parameters Example**: ```json { "image": "https://segmind-resources.s3.amazonaws.com/output/58c03b83-811d-4c4d-8837-1c01b8c8cdea-wan2.6-i2v-ip.webp", "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" } ``` **Full Example**: ```json { "seed": null, "audio": null, "image": "https://segmind-resources.s3.amazonaws.com/output/58c03b83-811d-4c4d-8837-1c01b8c8cdea-wan2.6-i2v-ip.webp", "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", "duration": 5, "resolution": "720p", "multi_shots": false, "negative_prompt": "low resolution, error, worst quality, low quality, defects", "enable_prompt_expansion": true } ``` ### Output Schema The API returns a synchronous response based on the model type: **For Image/Video/Audio Models**: - Response contains binary data (image/png, video/mp4, audio/mp3) - Content-Type header indicates the media type - Save the response body directly to a file **For Text Models**: - Response is JSON with the generated text - Structure varies by model **HTTP Response Codes**: - **200 - OK**: Request successful, output in response body - **400 - Bad Request**: Invalid parameters - **401 - Unauthorized**: Invalid or missing API key - **404 - Not Found**: Model not found - **406 - Not Acceptable**: Insufficient credits - **429 - Too Many Requests**: Rate limit exceeded - **500 - Server Error**: Internal server error ## Usage Examples ### cURL ```bash curl -X POST "https://api.segmind.com/v1/wan-2.6-i2v" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "seed": null, "audio": null, "image": "https://segmind-resources.s3.amazonaws.com/output/58c03b83-811d-4c4d-8837-1c01b8c8cdea-wan2.6-i2v-ip.webp", "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", "duration": 5, "resolution": "720p", "multi_shots": false, "negative_prompt": "low resolution, error, worst quality, low quality, defects", "enable_prompt_expansion": true }' ``` ### Python ```python import requests import json api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/wan-2.6-i2v" data = { "seed": null, "audio": null, "image": "https://segmind-resources.s3.amazonaws.com/output/58c03b83-811d-4c4d-8837-1c01b8c8cdea-wan2.6-i2v-ip.webp", "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", "duration": 5, "resolution": "720p", "multi_shots": false, "negative_prompt": "low resolution, error, worst quality, low quality, defects", "enable_prompt_expansion": true } response = requests.post( url, json=data, headers={ 'x-api-key': api_key, 'Content-Type': 'application/json' } ) if response.status_code == 200: # For image/video/audio models, response.content contains the binary data with open('output.png', 'wb') as f: f.write(response.content) print('Generation complete, saved to output.png') else: print(f"Error: {response.status_code}") print(response.text) ``` ### JavaScript ```javascript const apiKey = 'YOUR_API_KEY'; const url = 'https://api.segmind.com/v1/wan-2.6-i2v'; const data = { "seed": null, "audio": null, "image": "https://segmind-resources.s3.amazonaws.com/output/58c03b83-811d-4c4d-8837-1c01b8c8cdea-wan2.6-i2v-ip.webp", "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", "duration": 5, "resolution": "720p", "multi_shots": false, "negative_prompt": "low resolution, error, worst quality, low quality, defects", "enable_prompt_expansion": true }; const response = await fetch(url, { method: 'POST', headers: { 'x-api-key': apiKey, 'Content-Type': 'application/json', }, body: JSON.stringify(data), }); if (response.ok) { // For image/video/audio models, response contains binary data const blob = await response.blob(); const downloadUrl = URL.createObjectURL(blob); // Create download link const a = document.createElement('a'); a.href = downloadUrl; a.download = 'output.png'; a.click(); console.log('Generation complete'); } ``` ## Additional Resources ### Documentation - [Model Playground](https://www.segmind.com/models/wan-2.6-i2v) - [API Documentation](https://www.segmind.com/models/wan-2.6-i2v/api) - [Pricing Details](https://www.segmind.com/models/wan-2.6-i2v/pricing) - [Platform Documentation](https://docs.segmind.com/) ### Tags No tags available