Skip to main content
Glama

wan_generate_video_from_image

Generate an AI video from a reference image using Wan image-to-video models. Returns a task ID and video URLs for text-to-video or character reference workflows.

Instructions

Generate AI video from a reference image using Wan image-to-video models.

This supports three models:
- wan2.6-i2v: Standard image-to-video generation
- wan2.6-r2v: Reference video-to-video with character/timbre extraction
- wan2.6-i2v-flash: Fast image-to-video generation

Returns:
    Task ID and generated video information including URLs and state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoOptional random seed.
sizeNoThe size of the generated video (e.g., '1280x720').
audioNoWhether the generated video should include audio. Default is false.
mediaNoOptional media inputs with a type and URL, supported by wan3.0-video.
modelNoWan model to use. Default: 'wan2.6-i2v'.wan2.6-i2v
ratioNoVideo aspect ratio. Options include 'adaptive', '16:9', and '9:16'.
promptYesDescription of the video motion and content. Describe what should happen in the video.
durationNoVideo duration in seconds. Use 2-30, or -1 when supported by the model.
audio_urlNoURL of reference audio to use in the video.
image_urlYesURL of the reference image for video generation. The video will be generated based on this image.
shot_typeNoShot type: 'single' for continuous shot, 'multi' for multi-cut editing.
watermarkNoWhether to add a watermark. Default is false.
resolutionNoVideo resolution. Options: '480P', '720P' (default), '1080P'.720P
callback_urlNoWebhook callback URL for asynchronous notifications.
prompt_extendNoEnable LLM-based prompt rewriting. Default is false.
negative_promptNoContent to exclude from the video. Maximum 500 characters.
reference_video_urlsNoJSON array of reference video URLs for character/timbre extraction. Used with the wan2.6-r2v model. Pass each URL as a separate array item; never join URLs with commas and never JSON-stringify the array. Legacy comma-separated strings are still accepted for backward compatibility.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv0.1.20
    • addedInput schema / $defs
      Added value: +{
      +  "MediaItem": {
      +    "description": "A media input for video generation.",
      +    "properties": {
      +      "type": {
      +        "enum": [
      +          "first_frame",
      +          "last_frame",
      +          "reference_image",
      +          "reference_video",
      +          "reference_audio",
      +          "file",
      +          "link"
      +        ],
      +        "title": "Type",
      +        "type": "string"
      +      },
      +      "url": {
      +        "title": "Url",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "url"
      +    ],
      +    "title": "MediaItem",
      +    "type": "object"
      +  }
      +}
    • changedInput schema / properties / audio / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / audio / description
      Previous value: -"Whether the generated video should include audio. Default is true."New value: +"Whether the generated video should include audio. Default is false."
    • changedInput schema / properties / duration / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      5,
      -      10,
      -      15
      -    ],
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "const": -1,
      +    "type": "integer"
      +  },
      +  {
      +    "maximum": 30,
      +    "minimum": 2,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / duration / description
      Previous value: -"Video duration in seconds. Options: 5, 10, or 15."New value: +"Video duration in seconds. Use 2-30, or -1 when supported by the model."
    • addedInput schema / properties / media
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "$ref": "#/$defs/MediaItem"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional media inputs with a type and URL, supported by wan3.0-video.",
      +  "title": "Media"
      +}
    • changedInput schema / properties / model / description
      Previous value: -"Model to use. Options: 'wan2.6-i2v' (standard image-to-video), 'wan2.6-r2v' (reference video-to-video), 'wan2.6-i2v-flash' (fast image-to-video). Default: 'wan2.6-i2v'."New value: +"Wan model to use. Default: 'wan2.6-i2v'."
    • addedInput schema / properties / model / enum
      Added value: +[
      +  "wan2.6-t2v",
      +  "wan2.6-i2v",
      +  "wan2.6-r2v",
      +  "wan2.6-i2v-flash",
      +  "wan3.0-video"
      +]
    • changedInput schema / properties / prompt_extend / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / prompt_extend / description
      Previous value: -"Enable LLM-based prompt rewriting. Default is true."New value: +"Enable LLM-based prompt rewriting. Default is false."
    • addedInput schema / properties / ratio
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "adaptive",
      +        "16:9",
      +        "4:3",
      +        "1:1",
      +        "3:4",
      +        "9:16"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Video aspect ratio. Options include 'adaptive', '16:9', and '9:16'.",
      +  "title": "Ratio"
      +}
    • addedInput schema / properties / seed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional random seed.",
      +  "title": "Seed"
      +}
    • removedInput schema / properties / timeout
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Timeout in seconds. Default is 1800.",
      -  "title": "Timeout"
      -}
    • addedInput schema / properties / watermark
      Added value: +{
      +  "default": false,
      +  "description": "Whether to add a watermark. Default is false.",
      +  "title": "Watermark",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv0.1.18
    • changedInput schema / properties / reference_video_urls / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / reference_video_urls / description
      Previous value: -"Comma-separated URLs of reference videos for character/timbre extraction. Used with wan2.6-r2v model."New value: +"JSON array of reference video URLs for character/timbre extraction. Used with the wan2.6-r2v model. Pass each URL as a separate array item; never join URLs with commas and never JSON-stringify the array. Legacy comma-separated strings are still accepted for backward compatibility."
  3. Changed4 schema fields changedv0.1.17
    • changedInput schema / properties / audio / default
      Previous value: -falseNew value: +true
    • changedInput schema / properties / audio / description
      Previous value: -"Whether the generated video should include audio. Default is false."New value: +"Whether the generated video should include audio. Default is true."
    • changedInput schema / properties / prompt_extend / default
      Previous value: -falseNew value: +true
    • changedInput schema / properties / prompt_extend / description
      Previous value: -"Enable LLM-based prompt rewriting. Default is false."New value: +"Enable LLM-based prompt rewriting. Default is true."
  4. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It discloses one useful trait: the call returns a Task ID, implying asynchronous generation. However, it says nothing about cost, latency, expected polling via wan_get_task, permission requirements, or which parameters are model-gated, which are critical for a long-running generation call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence is front-loaded and the model bullets are scannable, with no filler text. The 'Returns' block is somewhat redundant given an output schema exists, but the overall structure is tight and readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-parameter, multi-model generative tool with no annotations, the description is thin: it omits the async polling workflow, model-to-parameter dependencies, and cost/credit implications. An output schema exists, so the return summary is somewhat redundant. Adequate but with clear gaps for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does add meaning for three models, but it omits two enum values ('wan2.6-t2v', 'wan3.0-video') and doesn't explain how model choice constrains other params (e.g., reference_video_urls, audio_url, media). Marginal value beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Generate AI video from a reference image') and names the Wan i2v model family. It does not differentiate this tool from the sibling 'wan_generate_video' or 'wan_generate_video_all_in_one', so an agent must infer which one to pick. The model list also oddly includes 'wan2.6-r2v' (reference video-to-video), which blurs the tool's stated image-input scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use, when-not-to-use, or alternative-tool guidance is given, despite three closely related video-generation siblings. It doesn't note that wan2.6-r2v requires reference_video_urls rather than an image, nor when to prefer the all-in-one sibling. The agent gets model options but no routing logic.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.