## Basic model info - Model name: alibaba/alibaba wan-3.0 - Model description: Wan 3.0 is the latest generation video model from Alibaba's Wan series, delivering enhanced motion smoothness, superior scene fidelity, and greater visual coherence, with native audio generation and smart duration up to 30s. - Endpoint name: image-to-video ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/alibaba/wan-3.0/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input model for Wan 3.0 image-to-video generation.", "properties": { "prompt": { "description": "Text prompt describing the desired video motion", "title": "Prompt", "type": "string", "x-sr-order": 200 }, "aspect_ratio": { "default": "adaptive", "description": "Output aspect ratio, or adaptive selection", "enum": [ "adaptive", "16:9", "4:3", "1:1", "3:4", "9:16" ], "title": "Aspect Ratio", "type": "string", "x-sr-order": 402 }, "start_image": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "URL of the image to use as the first frame", "title": "Start Image", "x-sr-order": 301 }, "end_image": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" }, { "type": "null" } ], "description": "URL of the image to use as the last frame", "title": "End Image", "x-sr-order": 302 }, "seed": { "description": "Random seed for reproducibility", "maximum": 2147483647, "minimum": 0, "title": "Seed", "type": "integer", "x-sr-order": 201 }, "audio": { "default": true, "description": "Include generated audio", "title": "Audio", "type": "boolean", "x-sr-order": 404 }, "duration": { "anyOf": [ { "maximum": 30, "minimum": 2, "type": "integer" }, { "type": "null" } ], "default": 5, "description": "Output duration in seconds (2-30). Set to null for smart duration, which lets the model pick a length from the prompt and reference media.", "title": "Duration", "x-sr-order": 401 }, "enable_thinking": { "default": false, "description": "Enable enhanced reasoning before generation", "title": "Enable Thinking", "type": "boolean", "x-sr-order": 405 }, "resolution": { "default": "1080p", "description": "Output video resolution tier", "enum": [ "480p", "720p", "1080p" ], "title": "Resolution", "type": "string", "x-sr-order": 403 } }, "required": [ "start_image" ], "title": "ImageToVideoInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Video output with billed duration for Wan 3.0.", "properties": { "output_video_dur": { "description": "Billed duration in seconds. Output video duration, plus total reference video input duration for reference-to-video.", "title": "Output Video Dur", "type": "integer" }, "video": { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" } }, "required": [ "video", "output_video_dur" ], "title": "Wan3VideoOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "prompt": "", "aspect_ratio": "adaptive", "start_image": "", "end_image": null, "seed": null, "audio": true, "duration": 5, "enable_thinking": false, "resolution": "1080p" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("alibaba/wan-3.0/image-to-video", { input: { prompt: '', seed: null, start_image: '', end_image: null, duration: 5, aspect_ratio: 'adaptive', resolution: '1080p', audio: true, enable_thinking: false }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "alibaba/wan-3.0/image-to-video", arguments={ "prompt": "", "seed": None, "start_image": "", "end_image": None, "duration": 5, "aspect_ratio": "adaptive", "resolution": "1080p", "audio": True, "enable_thinking": False }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "alibaba/wan-3.0/image-to-video", SubscribeOptions.builder() .input(Map.of( "prompt", "", "seed", null, "start_image", "", "end_image", null, "duration", 5, "aspect_ratio", "adaptive", "resolution", "1080p", "audio", true, "enable_thinking", false)) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "alibaba/wan-3.0/image-to-video", input = mapOf( "prompt" to "", "seed" to null, "start_image" to "", "end_image" to null, "duration" to 5, "aspect_ratio" to "adaptive", "resolution" to "1080p", "audio" to true, "enable_thinking" to false), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/alibaba/wan-3.0/image-to-video \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":"","seed":null,"start_image":"","end_image":null,"duration":5,"aspect_ratio":"adaptive","resolution":"1080p","audio":true,"enable_thinking":false}' ``` ## Model readme >