Mogu IO/Models/

Wan 3.0 Image to Video

Video

Model Information

Model IDalibaba/wan-3.0/image-to-video
CategoryVideo
Endpoint/api/v1/videos
Input Modalitiestext, image
Output Modalitiesvideo, audio

Create Task

POST https://mogu.io/api/v1/videos

Authentication: Authorization: Bearer <api-key>

Request Parameters

ParameterTypeRequiredDefaultDescription
modelstring✓Model ID: alibaba/wan-3.0/image-to-video
seednumber (-1..2147483647)-1Random seed (-1 for random)
imageurl✓First-frame image URL or data URI
promptstring✓Describe motion, actions, camera movement and style
timeoutnumber (60..3600)1800Maximum wait time in seconds
durationnumber (2..30)5Output duration in whole seconds (2 to 30)
last_imageurlOptional last-frame image URL or data URI
resolutionenum: 480p | 720p | 1080p"720p"Output video resolution
aspect_ratioenum: | 16:9 | 9:16 | 1:1 | 4:3 | 3:4""Leave blank to follow the input image
generate_audiobooleantrueInclude generated audio
enable_prompt_expansionbooleanfalseEnable automatic prompt expansion

Multimodal Input

This model supports image input. Use the content array format:

{
  "role": "user",
  "content": [
    {
      "type": "text",
      "text": "Describe this"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/photo.jpg"
      }
    }
  ]
}

Multimodal Output

This model can output video, audio. Add modalities to your request:

{
  "model": "alibaba/wan-3.0/image-to-video",
  "messages": [
    {
      "role": "user",
      "content": "Draw a cat"
    }
  ],
  "modalities": [
    "video",
    "audio"
  ]
}

Image output does not support streaming. Set stream: false.

Code Examples

# Step 1: Create task
curl -X POST https://mogu.io/api/v1/videos \
  -H "Authorization: Bearer <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-3.0/image-to-video",
  "seed": -1,
  "image": "https://example.com/image.jpg",
  "prompt": "Your prompt here",
  "timeout": 1800,
  "duration": 5,
  "resolution": "720p",
  "aspect_ratio": "",
  "generate_audio": true,
  "enable_prompt_expansion": false
}'

# Step 2: Poll for result
curl https://mogu.io/api/v1/videos/{task-id} \
  -H "Authorization: Bearer <api-key>"

Response

Create Response (202)

{
  "id": "task-uuid",
  "status": "pending",
  "polling_url": "/api/v1/videos/task-uuid"
}

Poll: GET https://mogu.io/api/v1/videos/:id — Completed

{
  "id": "task-uuid",
  "status": "completed",
  "output": {
    "urls": [
      "https://cdn.example.com/video.mp4"
    ]
  },
  "credit": 4000
}

Poll every 3-5 seconds. Status values: pending → in_progress → completed | failed

Error Codes

HTTPTypeDescription
400invalid_request_errorInvalid parameters
400content_moderationContent blocked by safety system
400input_too_largeInput exceeds model limit
401auth_errorInvalid API key
402insufficient_creditsNot enough credits
429rate_limit_errorToo many requests
502provider_errorUpstream error, retry later
504timeout_errorRequest timed out
Try in PlaygroundAPI ReferenceAll Models