ModelSell Docs
VideosWan Video

Wan 3.0 Video Generation

Create and poll Wan 3.0 video tasks through either the ModelSell generic video format or the native Alibaba Cloud Model Studio format.

Wan 3.0 is an asynchronous video model for text-to-video, first-frame and first/last-frame generation, reference-based generation, video editing and extension, and generation from a file or public web page. ModelSell supports both its generic video format and the native Wan 3.0 request format.

The fields and limits on this page follow the official Alibaba Cloud Model Studio Wan 3.0 API reference. ModelSell-specific behavior, including public task IDs and generic-field conversion, is called out separately.

Supported Models

ModelDescription
wan3.0-video-primeFaster edition with the same capabilities as the standard edition
wan3.0-videoStandard edition

Wan 3.0 produces 30 fps video and supports output durations of up to 30 seconds.

Choose a Request Format

FormatCreate taskPoll taskBest for
ModelSell genericPOST /v1/video/generationsGET /v1/video/generations/{task_id}Applications sharing one request shape across multiple video providers
Wan 3.0 nativePOST /api/v1/services/aigc/video-generation/video-synthesisGET /api/v1/tasks/{task_id}Existing Model Studio integrations or applications that need every native Wan parameter

Both formats use your ModelSell base URL and ModelSell API key:

export MODELSELL_BASE_URL="https://api.modelsell.com"
export MODELSELL_API_KEY="sk-..."

For a proxy domain or test environment, replace only MODELSELL_BASE_URL and keep the paths unchanged. Do not use the upstream Alibaba Cloud URL containing {WorkspaceId} as the ModelSell client URL.

Server administrators should configure an Ali channel with the Model Studio API key. API clients select the model and do not send a channel type.

The same generic JSON is also accepted by POST /v1/videos, with polling at GET /v1/videos/{task_id}. This guide consistently uses /v1/video/generations; keep the create and poll path families paired.

ModelSell Generic Format

The generic format is designed for applications that switch among different video models. prompt is required by the generic endpoint.

Field Mapping

Generic fieldNative Wan 3.0 fieldNotes
modelmodelSupports both Wan 3.0 models
promptinput.promptRequired in the generic format
image, or the first item in images[]A first_frame item in input.mediaStrict first frame
The second item in images[]A last_frame item in input.mediaStrict last frame
reference_images[].urlreference_image items in input.mediaUp to 10 images
video.urlA reference_video item in input.mediaUp to five clips, 15 seconds total
sizeparameters.resolution480P, 720P, or 1080P; lowercase input is normalized
seconds or durationparameters.durationseconds takes precedence
metadata.input.mediaReplaces all media shortcutsUse for reference audio, files, links, or exact media typing
metadata.parametersparametersPasses all native Wan generation parameters

When metadata.input.media is non-empty, ModelSell does not merge in image, images[], reference_images, or video. Put every media item in metadata.input.media when combining multiple media types.

Text to Video

curl -X POST "$MODELSELL_BASE_URL/v1/video/generations" \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video-prime",
    "prompt": "A kitten runs across a rooftop under moonlight while city neon glows in the distance, cinematic lighting and smooth camera motion",
    "size": "720P",
    "duration": 5,
    "metadata": {
      "parameters": {
        "ratio": "16:9",
        "audio": true,
        "seed": 7,
        "prompt_extend": true,
        "watermark": false
      }
    }
  }'

First and Last Frames

The first two entries in images[] map to first_frame and last_frame:

{
  "model": "wan3.0-video",
  "prompt": "A young woman changes from a smile to laughter as the camera moves closer and the background shifts from cool to warm light",
  "images": [
    "https://example.com/first-frame.png",
    "https://example.com/last-frame.png"
  ],
  "size": "480P",
  "seconds": "5",
  "metadata": {
    "parameters": {
      "ratio": "adaptive",
      "audio": false,
      "prompt_extend": true,
      "watermark": false
    }
  }
}

Reference Images and Video

{
  "model": "wan3.0-video",
  "prompt": "The person in Video 1 picks up the fan from Image 1 and slowly turns in the courtyard",
  "reference_images": [
    {
      "url": "https://example.com/fan.png"
    }
  ],
  "video": {
    "url": "https://example.com/character.mp4"
  },
  "duration": 5,
  "metadata": {
    "parameters": {
      "resolution": "720P",
      "ratio": "adaptive",
      "audio": true,
      "seed": 0,
      "prompt_extend": false,
      "watermark": false
    }
  }
}

Full Native Media Support

The generic format has no dedicated shortcut for reference audio, files, or web pages. Use metadata.input.media to access every official media type. Explicit false and 0 values in metadata.parameters are preserved:

{
  "model": "wan3.0-video",
  "prompt": "Create a product video using the motion from Video 1, the outfit from Image 1, and the rhythm from Audio 1",
  "metadata": {
    "input": {
      "media": [
        {
          "type": "reference_image",
          "url": "https://example.com/outfit.png"
        },
        {
          "type": "reference_video",
          "url": "https://example.com/motion.mp4"
        },
        {
          "type": "reference_audio",
          "url": "https://example.com/music.mp3"
        }
      ]
    },
    "parameters": {
      "resolution": "1080P",
      "ratio": "16:9",
      "duration": 10,
      "audio": true,
      "seed": 0,
      "prompt_extend": false,
      "watermark": false
    }
  }
}

For file-based generation, use {"type":"file","url":"https://example.com/product.pdf"}. For a public page, use {"type":"link","url":"https://example.com/article"}. file and link cannot appear together.

Generic Response and Polling

Store the public id or task_id returned by ModelSell:

{
  "id": "task_xxxxxxxxxxxxxxxx",
  "task_id": "task_xxxxxxxxxxxxxxxx",
  "object": "video",
  "status": "queued",
  "model": "wan3.0-video-prime",
  "progress": 0,
  "created_at": 1787932800
}

Poll with that same public task ID:

curl "$MODELSELL_BASE_URL/v1/video/generations/task_xxxxxxxxxxxxxxxx" \
  -H "Authorization: Bearer $MODELSELL_API_KEY"

On success, read the final video URL from metadata.url. Timing, prompt, and usage fields are also returned in metadata:

{
  "id": "task_xxxxxxxxxxxxxxxx",
  "task_id": "task_xxxxxxxxxxxxxxxx",
  "object": "video",
  "status": "completed",
  "model": "wan3.0-video-prime",
  "seconds": "5",
  "video_url": "https://example.com/wan3-result.mp4",
  "metadata": {
    "url": "https://example.com/wan3-result.mp4",
    "request_id": "request_xxxxxxxxxxxxxxxx",
    "orig_prompt": "A kitten runs across a rooftop under moonlight",
    "usage": {
      "video_count": 1,
      "duration": 5.0,
      "input_video_duration": 0.0,
      "output_video_duration": 5.0,
      "fps": 30,
      "SR": 720,
      "ratio": "16:9"
    }
  }
}

Generic task states are queued, in_progress, completed, and failed.

Wan 3.0 Native Format

The native endpoint keeps the official Model Studio request body, task states, and response fields. Existing native clients can change their base URL and API key to ModelSell.

The upstream API requires X-DashScope-Async: enable on task creation. ModelSell adds this header to the upstream request automatically, so clients may omit it. Existing official clients may keep it.

Create a Task

curl -X POST "$MODELSELL_BASE_URL/api/v1/services/aigc/video-generation/video-synthesis" \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-DashScope-Async: enable" \
  -d '{
    "model": "wan3.0-video",
    "input": {
      "prompt": "The person in Video 1 wears the coat from Image 1 and walks through the street to the rhythm of Audio 1",
      "media": [
        {
          "type": "reference_image",
          "url": "https://example.com/coat.png"
        },
        {
          "type": "reference_video",
          "url": "https://example.com/walk.mp4"
        },
        {
          "type": "reference_audio",
          "url": "https://example.com/beat.mp3"
        }
      ]
    },
    "parameters": {
      "resolution": "720P",
      "ratio": "adaptive",
      "duration": 5,
      "audio": true,
      "seed": 0,
      "prompt_extend": false,
      "watermark": false
    }
  }'

Provide at least one of input.prompt or input.media. The prompt limit is 20,000 characters; the upstream service truncates excess input.

Native Parameters

ParameterTypeDefaultValues and behavior
parameters.resolutionstring1080P480P, 720P, or 1080P
parameters.ratiostringadaptiveadaptive, 16:9, 4:3, 1:1, 3:4, or 9:16
parameters.durationinteger52–30 without video input; input video duration plus output duration must not exceed 30; -1 enables smart duration
parameters.audiobooleantrueWhether the output includes an audio track
parameters.seedintegerRandom0–2147483647; an explicit 0 is preserved
parameters.prompt_extendbooleantrueEnables prompt rewriting; an explicit false is preserved
parameters.watermarkbooleanfalseAdds a watermark; an explicit false is preserved

Media Types and Limits

input.media[].typeCount and limitsSupported url form
first_frameUp to one image, used as the strict first framePublic URL, temporary OSS URL, or Base64 Data URL
last_frameUp to one image, used as the strict last framePublic URL, temporary OSS URL, or Base64 Data URL
reference_imageUp to 10 imagesPublic URL, temporary OSS URL, or Base64 Data URL
reference_videoUp to five clips; 1–15 seconds each and 15 seconds totalPublic URL or temporary OSS URL
reference_audioUp to five clips; 1–15 seconds each and 15 seconds totalPublic URL or temporary OSS URL
fileUp to one file, 100 MB maximumPublic URL or temporary OSS URL
linkUp to one public page that requires no loginPublic HTTP/HTTPS URL

first_frame and last_frame cannot be combined with reference_image, reference_video, reference_audio, file, or link. file and link are also mutually exclusive.

Images may be JPEG, JPG, PNG, BMP, or WEBP; PNG transparency is not supported. Each side must be between 240 and 8,000 pixels, the aspect ratio may not exceed 8:1, and the file may not exceed 20 MB. Reference video supports MP4 and MOV, each side between 240 and 4,096 pixels, an aspect ratio no greater than 8:1, and a 100 MB maximum size. Reference audio supports WAV and MP3 up to 15 MB.

file supports DOCX, DOC, XLSX, XLS, PPTX, PPT, PDF, TXT, KEY, PAGES, NUMBERS, and MD up to 100 MB. PDF, Word, PowerPoint, Keynote, and Pages-style documents are limited to 50 pages.

Submit Response

ModelSell preserves the native response and replaces only output.task_id with the public ModelSell task ID:

{
  "output": {
    "task_status": "PENDING",
    "task_id": "task_xxxxxxxxxxxxxxxx"
  },
  "request_id": "request_xxxxxxxxxxxxxxxx"
}

Native provider error fields are preserved when the upstream rejects a request:

{
  "code": "InvalidParameter",
  "message": "The request parameters are invalid.",
  "request_id": "request_xxxxxxxxxxxxxxxx"
}

Poll a Native Task

curl "$MODELSELL_BASE_URL/api/v1/tasks/task_xxxxxxxxxxxxxxxx" \
  -H "Authorization: Bearer $MODELSELL_API_KEY"

Native task states are PENDING, RUNNING, SUCCEEDED, FAILED, CANCELED, and UNKNOWN. On success, read the video URL from output.video_url. A successful response looks like this:

{
  "request_id": "request_xxxxxxxxxxxxxxxx",
  "output": {
    "task_id": "task_xxxxxxxxxxxxxxxx",
    "task_status": "SUCCEEDED",
    "submit_time": "2026-08-06 10:01:35.452",
    "scheduled_time": "2026-08-06 10:01:35.507",
    "end_time": "2026-08-06 10:13:33.838",
    "orig_prompt": "A kitten runs across a rooftop under moonlight",
    "video_url": "https://example.com/wan3-result.mp4"
  },
  "usage": {
    "video_count": 1,
    "duration": 5.0,
    "input_video_duration": 0.0,
    "output_video_duration": 5.0,
    "fps": 30,
    "SR": 720,
    "ratio": "16:9"
  }
}

Poll about every 15 seconds. Upstream task IDs and result URLs remain available for 24 hours, so download or copy successful results promptly. Always poll with the public task_id returned by ModelSell, not an upstream task ID found in server logs.

On this page