# Wan 2.7 Lora API Complete API reference for Wan 2.7 Lora image-to-video generation by Alibaba. ## Model Variants This API supports one model variant: | Model | ID | Description | |-------|-----|-------------| | **Wan 2.7 Lora Image to Video** | `wan-2.7-lora-image-to-video` | High-quality image-to-video animation | ## Quick Comparison | Feature | Image to Video | |---------|----------------| | Input | Image + Text prompt | | Duration Range | 2-15 seconds | | Resolution Options | 720p, 1080p | | Aspect Ratios | Not supported (source-driven) | | Audio Support | Optional custom audio | | Start Frame | Required | ## Wan 2.7 Lora Image to Video ### Endpoint ``` POST /api/v1/video/task ``` ### Request Parameters #### Required | Parameter | Type | Description | |-----------|------|-------------| | `model_name` | string | Must be `"wan-2.7-lora-image-to-video"` | | `prompt` | string | Video generation prompt | | `image_url` | string | First-frame image URL | | `duration` | number | Video duration in seconds. Must be between `2` and `15`. | | `resolution` | string | Required output resolution: `"720p"` or `"1080p"`. Default value is `"720p"`. | #### Optional | Parameter | Type | Description | |-----------|------|-------------| | `audio_url` | string | Optional custom audio URL. Supported formats: wav or mp3. Audio duration should be 2-30 seconds. | | `negative_prompt` | string | Content to suppress in the generated video | | `seed` | number | Random seed in range `[0, 2147483647]` | ### Example Request ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'wan-2.7-lora-image-to-video', prompt: 'The girl is dancing', image_url: 'https://example.com/source-image.jpg', resolution: '720p', duration: 5, audio_url: 'https://example.com/background-audio.mp3', seed: 4, negative_prompt: 'other people' }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Response Format Submit response: ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "submitted" } } ``` Poll with `GET /api/v1/video/{task_id}`. Task statuses: `submitted`, `processing`, `succeed`, `failed`. ## Best Practices - Use motion prompts that describe subject movement and camera behavior clearly. - Provide a clean first-frame image with a well-defined subject. - Use `negative_prompt` to reduce unwanted artifacts or extra subjects in the scene.