# Wan 3.0 Video > Generate up to 30 seconds of 1080p video with native audio from text, first and last frames, or reference images, video, and audio — in one model. ## Overview - **Endpoint**: `https://api.segmind.com/v1/wan3.0-video` - **Model ID**: `wan3.0-video` - **Category**: Image-to-Video Generation - **Type**: Synchronous (Direct response) - **Average Cost**: $0.6938390313390314 ## Pricing | resolution | duration | cost | | --- | --- | --- | | 480p | 1 | 0.05 | | 720p | 1 | 0.1 | | 1080p | 1 | 0.2 | ## 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: - **`prompt`** (`string`, _required_): Prompt Describe the video. Required unless you supply an image or video input. - **`image`** (`File (URL)`, _optional_): First Frame Start the video from this image (image-to-video). - **`last_frame`** (`File (URL)`, _optional_): Last Frame Optional end frame. Use with First Frame to control the whole shot. - **`reference_images`** (`array`, _optional_): Reference Images Images whose subject, character or style the video should follow. - Item type: string - **`reference_videos`** (`array`, _optional_): Reference Videos Videos to guide motion or style, or the clip you want edited. - Item type: string - **`audio_url`** (`File (URL)`, _optional_): Reference Audio Optional audio track to drive the video, including lip-sync. - **`resolution`** (`string`, _optional_): Resolution Output resolution. Affects pricing. - Default: `"720P"` - Options: "480P" (480p), "720P" (720p), "1080P" (1080p) - **`duration`** (`integer`, _optional_): Duration (seconds) Clip length, 2 to 30 seconds. Affects pricing. Use -1 to match the source when editing a video. - Default: `5` - Range: -1 to 30 - **`aspect_ratio`** (`string`, _optional_): Aspect Ratio Framing for text-to-video. Ignored when a first frame or reference sets the shape. - Options: "16:9" (16:9), "4:3" (4:3), "1:1" (1:1), "3:4" (3:4), "9:16" (9:16), "adaptive" (Adaptive - match the input) - **`negative_prompt`** (`string`, _optional_): Negative Prompt Content to keep out of the video. - **`prompt_extend`** (`boolean`, _optional_): Prompt Extend Let the model rewrite and enrich short prompts. - Default: `true` - **`seed`** (`integer`, _optional_): Seed Seed for reproducible results. - Range: 0 to 2147483647 - **`watermark`** (`boolean`, _optional_): Watermark Add an "AI Generated" watermark. - Default: `false` - **`audio`** (`boolean`, _optional_): Generate Audio Generate a synchronised soundtrack in the same pass. Does not change the price. - Default: `true` **Required Parameters Example**: ```json { "prompt": "The ocean waves roll gently onto the shore and spread across the wet, reflective sand as warm golden sunset light shimmers on the water. Sea foam bubbles and recedes, a soft breeze stirs the surface, and the seagulls glide and flap slowly across the glowing sky. Natural, realistic motion. Ambient sound of rolling ocean waves, gentle sea breeze, and distant seagull calls." } ``` **Full Example**: ```json { "prompt": "The ocean waves roll gently onto the shore and spread across the wet, reflective sand as warm golden sunset light shimmers on the water. Sea foam bubbles and recedes, a soft breeze stirs the surface, and the seagulls glide and flap slowly across the glowing sky. Natural, realistic motion. Ambient sound of rolling ocean waves, gentle sea breeze, and distant seagull calls.", "image": "https://segmind-resources.s3.amazonaws.com/input/wan3.0-video-first-frame.jpg", "reference_images": [], "reference_videos": [], "resolution": "720P", "duration": 5, "aspect_ratio": "16:9", "negative_prompt": "sample text", "prompt_extend": true, "seed": 0, "watermark": false, "audio": 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/wan3.0-video" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "The ocean waves roll gently onto the shore and spread across the wet, reflective sand as warm golden sunset light shimmers on the water. Sea foam bubbles and recedes, a soft breeze stirs the surface, and the seagulls glide and flap slowly across the glowing sky. Natural, realistic motion. Ambient sound of rolling ocean waves, gentle sea breeze, and distant seagull calls.", "image": "https://segmind-resources.s3.amazonaws.com/input/wan3.0-video-first-frame.jpg", "reference_images": [], "reference_videos": [], "resolution": "720P", "duration": 5, "aspect_ratio": "16:9", "negative_prompt": "sample text", "prompt_extend": true, "seed": 0, "watermark": false, "audio": true }' ``` ### Python ```python import requests import json api_key = "YOUR_API_KEY" url = "https://api.segmind.com/v1/wan3.0-video" data = { "prompt": "The ocean waves roll gently onto the shore and spread across the wet, reflective sand as warm golden sunset light shimmers on the water. Sea foam bubbles and recedes, a soft breeze stirs the surface, and the seagulls glide and flap slowly across the glowing sky. Natural, realistic motion. Ambient sound of rolling ocean waves, gentle sea breeze, and distant seagull calls.", "image": "https://segmind-resources.s3.amazonaws.com/input/wan3.0-video-first-frame.jpg", "reference_images": [], "reference_videos": [], "resolution": "720P", "duration": 5, "aspect_ratio": "16:9", "negative_prompt": "sample text", "prompt_extend": true, "seed": 0, "watermark": false, "audio": 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/wan3.0-video'; const data = { "prompt": "The ocean waves roll gently onto the shore and spread across the wet, reflective sand as warm golden sunset light shimmers on the water. Sea foam bubbles and recedes, a soft breeze stirs the surface, and the seagulls glide and flap slowly across the glowing sky. Natural, realistic motion. Ambient sound of rolling ocean waves, gentle sea breeze, and distant seagull calls.", "image": "https://segmind-resources.s3.amazonaws.com/input/wan3.0-video-first-frame.jpg", "reference_images": [], "reference_videos": [], "resolution": "720P", "duration": 5, "aspect_ratio": "16:9", "negative_prompt": "sample text", "prompt_extend": true, "seed": 0, "watermark": false, "audio": 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/wan3.0-video) - [API Documentation](https://www.segmind.com/models/wan3.0-video/api) - [Pricing Details](https://www.segmind.com/models/wan3.0-video/pricing) - [Platform Documentation](https://docs.segmind.com/) ### Tags No tags available