# alibaba/wan-2.7/image-to-video > Empower your creative storytelling with alibaba/wan-2.7/image-to-video provided by ShortAPI. It reshapes single or multiple reference images into cinematic 1080P dynamic footage, supporting up to 15 seconds of content extension per generation. Featuring outstanding control over character texture and environmental consistency, it puts complex visual effects and smooth motion trajectories right at your fingertips. ## Overview - **Endpoint**: `https://api.shortapi.ai/api/v1/job/create` - **Model ID**: `alibaba/wan-2.7/image-to-video` - **Category**: image-to-video - **Kind**: inference ## Pricing Charged at $0.085 per second. For more details, please check our pricing page. ## API Information This model can be used via our HTTP API or more conveniently via our client libraries. See the input and output schema below, as well as the usage examples. ### Input Schema The API accepts the following input parameters: - **`prompt`** (`string`, _optional_): Positive text prompt. Supports both Chinese and English. Maximum length: 5000 characters - Examples: "An action shot of a black lab swimming..." - **`negative_prompt`** (`string`, _optional_): Negative text prompt. Supports both Chinese and English. Maximum length: 500 characters - **`resolution`** (`string`, _optional_): Output video resolution - Default: `1080p` - Options: "720p", "1080p" - **`duration`** (`int`, _optional_): Video Length, unit: s (seconds) - Default: `5` - Range: `2` to `15` - **`prompt_extend`** (`bool`, _optional_): Specifies whether to enable prompt rewriting. - Default: `false` - Options: "true", "false" - **`first_frame_image`** (`string`, _optional_): First frame image for video generation. Image requirements: Formats: JPEG, JPG, PNG (no transparency), BMP, WEBP; Resolution: Width and height must be within [240, 8000] pixels; Aspect ratio: Between 1:8 and 8:1; File size: Must not exceed 20MB. For this parameter, only the following specific input combinations are supported: first_frame, first_frame+driving_audio. Invalid combinations will return an error - **`last_frame_image`** (`string`, _optional_): Final frame image for video generation. Image requirements: Formats: JPEG, JPG, PNG (no transparency), BMP, WEBP; Resolution: Width and height must be within [240, 8000] pixels; Aspect ratio: Between 1:8 and 8:1; File size: Must not exceed 20MB. For this parameter, only the following specific input combinations are supported: first_frame+last_frame, first_frame+last_frame+driving_audio. Invalid combinations will return an error - **`driving_audio_url`** (`string`, _optional_): The URL of the audio file. Audio requirements: Formats: WAV, MP3, Duration: 2–30 seconds, File size: Must not exceed 15MB, Truncation handling: If the audio length exceeds the specified duration (e.g., 5 seconds), only the first 5 seconds will be used and the rest will be discarded. If the audio is shorter than the video duration, the remaining portion of the video will be silent. For example, if the audio is 3 seconds and the video duration is 5 seconds, the first 3 seconds will have sound and the last 2 seconds will be silent - **`first_clip_video_url`** (`string`, _optional_): The URL of the video file. Video requirements: Formats: MP4, MOV; Duration: 2–10 seconds; Resolution: Width and height must be within [240, 4096] pixels; Aspect ratio: Between 1:8 and 8:1; File size: Must not exceed 100MB. For this parameter, only the following specific input combinations are supported: first_clip, first_clip+last_frame. Invalid combinations will return an error ### Output Schema The API returns a JSON response with a `job_id` for tracking the request status. **Create Job Response:** ```json { "code": 0, "data": { "amount": "0.02", "job_id": "" } } ``` **Query Job Result (when status is 2, meaning succeeded):** ```json { "code": 0, "data": { "status": 2, "result": { "images": [{ "url": "https://..." }] } } } ``` ## Use Example To use this model, make an HTTP POST request to the API endpoint, then poll for results using the returned `job_id`. ### Bash (cURL) ```bash # Step 1: Create a job response=$(curl --request POST \ --url https://api.shortapi.ai/api/v1/job/create \ --header "Authorization: Bearer $SHORTAPI_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "alibaba/wan-2.7/image-to-video", "args": { "prompt": "Your request here" }, "callback_url": "CALLBACK_URL" }') JOB_ID=$(echo "$response" | grep -o '"job_id": *"[^"]*"' | sed 's/"job_id": *//; s/"//g') # Step 2: Poll for results curl --request GET \ --url "https://api.shortapi.ai/api/v1/job/query?id=$JOB_ID" \ --header "Authorization: Bearer $SHORTAPI_KEY" ``` ### JavaScript (Fetch API) ```javascript // Step 1: Create a job const response = await fetch(`https://api.shortapi.ai/api/v1/job/create`, { method: "POST", headers: { "Authorization": `Bearer ${SHORTAPI_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "model": "alibaba/wan-2.7/image-to-video", "args": { "prompt": "Your request here" }, "callback_url": "CALLBACK_URL" }) }); const data = await response.json(); const JOB_ID = data.job_id; // Step 2: Poll for results const result = await fetch(`https://api.shortapi.ai/api/v1/job/query?id=${JOB_ID}`, { method: "GET", headers: { "Authorization": `Bearer ${SHORTAPI_KEY}` } }); const resultData = await result.json(); console.log(resultData); ``` ### Python (Requests) ```python import requests # Step 1: Create a job url = "https://api.shortapi.ai/api/v1/job/create" payload = { "model": "alibaba/wan-2.7/image-to-video", "args": { "prompt": "Your request here" }, "callback_url": "CALLBACK_URL" } headers = { "Authorization": f"Bearer {SHORTAPI_KEY}", "Content-Type": "application/json" } response = requests.post(url, headers=headers, json=payload) data = response.json() JOB_ID = data.get("job_id") # Step 2: Poll for results result_url = f"https://api.shortapi.ai/api/v1/job/query?id={JOB_ID}" result = requests.get(result_url, headers={"Authorization": f"Bearer {SHORTAPI_KEY}"}) print(result.json()) ```