Skip to main content
wan-video avatar

Wan 2.7 Video Extend API

wan-video/wan/v2.7/video-extend

Extend an existing video clip into a longer one - up to 15 seconds in total, with matching audio, and optionally steered toward a closing frame you supply.

extend
Priced by resolution

Model Input

Input

The video clip to continue. The delivered video opens with this clip and carries its motion, subject and setting onward. MP4 or MOV; 2 to 10 seconds long; width and height each between 240 and 4096 px; aspect ratio between 1:8 and 8:1; up to 100 MB. The finished video takes its frame shape from this clip.

Optional description of how the clip should continue - the motion and camera movement to carry on with. The scene is already fixed by the source clip, so describe what happens next rather than re-describing the picture. Chinese and English are supported.

Optional closing frame. Supply it and the continuation is steered to end on this image; it cannot be used on its own, without a source video. JPEG, JPG, PNG (alpha channel not supported), BMP or WEBP; width and height each between 240 and 8000 px, aspect ratio between 1:8 and 8:1, up to 20 MB. It should share the source clip's aspect ratio.

Output video resolution. 720P bills at $0.10 per second of finished video; 1080P (default) bills at $0.15 per second. This picks the pixel tier only - the frame shape is inherited from your source clip.

Min: 2 - Max: 15

Total length of the video you get back, in seconds (2-15). The source clip is INCLUDED in this number, not added to it: with a 5-second source clip, duration 10 returns a 10-second video - your original 5 seconds followed by 5 newly generated ones - and is billed as 10 seconds. Set it clearly above your source clip's length; at or below that length there is no room for new footage and you still pay for the full duration.

Additional Settings

Customize your input with more control.

Describe content to avoid in the generated continuation.

When enabled, an LLM rewrites and enriches your prompt before generation, which suits short prompts but adds some processing time. Disable to follow your exact wording.

Min: 0 - Max: 2147483647

Random seed for reproducible results. Omit for a random seed each run.

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Loading
Generated in 49.014 seconds
Logs (1 lines)

Model Example Requests

Examples

Example output 1Example output 2

Model Pricing

Pricing

Model pricing varies by the target resolution of your output video.

720P
$0.1
per second of output video
or around 10 seconds for $1
1080P
$0.15
per second of output video
or around 7 seconds for $1

Wan 2.7 Video Extend API

Wan 2.7 Video Extend is a video-to-video AI model by wan-video. On ModelRunner it runs through a REST API or via MCP from any AI assistant, at $0.15 per second of video.

POST https://queue.modelrunner.run/wan-video/wan/v2.7/video-extend

cURL

# Submit a request to the queue. Input fields go at the top level of the
# body. The optional reserved "metadata" object holds your own flat string
# tags — stored on the request, never sent to the model; filter later with
# GET https://queue.modelrunner.run/requests?metadata=<url-encoded JSON>.
curl -X POST https://queue.modelrunner.run/wan-video/wan/v2.7/video-extend \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "The balloon climbs steadily higher as the valley mist burns away and full sunrise light spreads across the forested r…",
    "duration": 8,
    "video_url": "https://media.modelrunner.ai/o2lLq0jNZ5tC8AiQQiTXt.mp4",
    "resolution": "720P",
    "end_image_url": "https://media.modelrunner.ai/0ecvVGFAPQ3TMxh0-balloon-risen-endframe.png",
    "enable_prompt_expansion": true,
    "metadata": {
      "project": "my-project"
    }
  }'
# → { "request_id": "...", "status_url": "...", "response_url": "..." }

# Poll status_url until "COMPLETED", then fetch the result
curl "https://queue.modelrunner.run/wan-video/wan/v2.7/video-extend/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/wan-video/wan/v2.7/video-extend/requests/$REQUEST_ID" \
  -H "Authorization: Key $MRUN_API_KEY"

JavaScript

import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("wan-video/wan/v2.7/video-extend", {
  input: {
    "prompt": "The balloon climbs steadily higher as the valley mist burns away and full sunrise light spreads across the forested r…",
    "duration": 8,
    "video_url": "https://media.modelrunner.ai/o2lLq0jNZ5tC8AiQQiTXt.mp4",
    "resolution": "720P",
    "end_image_url": "https://media.modelrunner.ai/0ecvVGFAPQ3TMxh0-balloon-risen-endframe.png",
    "enable_prompt_expansion": true
  },
});
console.log(result);

Python

import os
import requests

headers = {"Authorization": f"Key {os.environ['MRUN_API_KEY']}"}

submitted = requests.post(
    "https://queue.modelrunner.run/wan-video/wan/v2.7/video-extend",
    headers=headers,
    json={
      "prompt": "The balloon climbs steadily higher as the valley mist burns away and full sunrise light spreads across the forested r…",
      "duration": 8,
      "video_url": "https://media.modelrunner.ai/o2lLq0jNZ5tC8AiQQiTXt.mp4",
      "resolution": "720P",
      "end_image_url": "https://media.modelrunner.ai/0ecvVGFAPQ3TMxh0-balloon-risen-endframe.png",
      "enable_prompt_expansion": true
    },
).json()

# Poll submitted["status_url"] until "COMPLETED", then:
result = requests.get(submitted["response_url"], headers=headers).json()

Input parameters

NameTypeRequiredDescription
video_urlstring (uri)yesThe video clip to continue. The delivered video opens with this clip and carries its motion, subject and setting onward. MP4 or MOV; 2 to 10 seconds long; width and height each between 240 and 4096 px; aspect ratio between 1:8 and 8:1; up to 100 MB. The finished video takes its frame shape from this clip.
promptstringnoOptional description of how the clip should continue - the motion and camera movement to carry on with. The scene is already fixed by the source clip, so describe what happens next rather than re-describing the picture. Chinese and English are supported.
end_image_urlstring (uri)noOptional closing frame. Supply it and the continuation is steered to end on this image; it cannot be used on its own, without a source video. JPEG, JPG, PNG (alpha channel not supported), BMP or WEBP; width and height each between 240 and 8000 px, aspect ratio between 1:8 and 8:1, up to 20 MB. It should share the source clip's aspect ratio.
resolutionenumnoOutput video resolution. 720P bills at $0.10 per second of finished video; 1080P (default) bills at $0.15 per second. This picks the pixel tier only - the frame shape is inherited from your source clip. Default: "1080P".
durationintegernoTotal length of the video you get back, in seconds (2-15). The source clip is INCLUDED in this number, not added to it: with a 5-second source clip, duration 10 returns a 10-second video - your original 5 seconds followed by 5 newly generated ones - and is billed as 10 seconds. Set it clearly above your source clip's length; at or below that length there is no room for new footage and you still pay for the full duration. Default: 10.
negative_promptstringnoDescribe content to avoid in the generated continuation.
enable_prompt_expansionbooleannoWhen enabled, an LLM rewrites and enriches your prompt before generation, which suits short prompts but adds some processing time. Disable to follow your exact wording. Default: true.
seedintegernoRandom seed for reproducible results. Omit for a random seed each run.

Machine-readable: OpenAPI schema · llms.txt

Use Wan 2.7 Video Extend from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Wan 2.7 Video Extend becomes a tool your assistant can call directly — it authorizes via OAuth (no API key in config) and runs this model with the run_model tool using the endpoint wan-video/wan/v2.7/video-extend.

MCP client config (Claude Desktop, Cursor)

{
  "mcpServers": {
    "modelrunner": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.modelrunner.run/mcp"]
    }
  }
}

Claude Code

claude mcp add --transport http modelrunner https://mcp.modelrunner.run/mcp

Then ask your assistant, for example: “Run wan-video/wan/v2.7/video-extend on ModelRunner to generate video”. MCP setup guide.

Model Details

Model Details

Wan 2.7 Video Extend continues an existing video clip. Supply a 2-10 second source clip and the model returns a longer video that opens with your footage and carries its motion and setting onward - optionally steered toward a closing image you supply. The delivered clip arrives with an audio track: background music or sound effects generated to match the picture. `duration` is the TOTAL length of what comes back, source clip included: a 5-second source with `duration: 10` returns your original 5 seconds plus 5 new ones, billed as 10. Output is 720P or 1080P and inherits its frame shape from the source clip, so there is no aspect-ratio control.

## Best for - Making an existing clip longer instead of re-shooting or re-generating it - Continuing a generated clip that ends mid-action, keeping the same scene and camera move - Extending a clip toward a specific ending - supply a closing image and the model bridges to it - Stretching a short clip to fill a 15-second ad or social slot, with sound already mixed in

## Choose another model when - You have no clip to continue - for a video built from a still photo or from text alone, use an image-to-video or text-to-video model - You want the motion driven by an audio track you supply - a continuation takes no driving audio, so lip-sync is out of reach here - You want to change what is already in the footage - restyling or swapping a subject is an edit, not a continuation; use a video-editing model - You need more than 15 seconds delivered, or a frame shape different from your source clip's

## Tips - Set `duration` clearly above your source clip's length; at or below it there is no room for new footage and you still pay for the full duration - `prompt` is optional but is your only control over what happens next - describe the motion and camera, not the scene the clip already fixes

## Limitations - The source clip is capped at 10 seconds and the delivered video at 15, so one call adds at most 13 seconds of new footage - Whether the source clip's own audio carries through is not documented; what is certain is that the delivered clip carries an audio track

To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("wan-video/wan/v2.7/video-extend", { input: { video_url: "https://media.modelrunner.ai/9q9nj5zc7wy5W6RdJg6Yk.mp4", prompt: "The camera keeps drifting forward as night falls over the courtyard and a light snow begins", resolution: "720P", duration: 10, }, }); ```