Skip to main content
wan-video avatar

Wan 2.7 Text to Video API

wan-video/wan/v2.7/text-to-video

Generate a 2-15 second video from a text prompt at 720P or 1080P, delivered with matching background music or sound effects generated alongside the picture.

Priced by resolution

Model Input

Input

Text description of the video to generate.

Output video resolution. 720P bills at $0.10 per second of finished video; 1080P (default) bills at $0.15 per second.

Min: 2 - Max: 15

Length of the generated video in seconds (2-15).

The aspect ratio of the generated video frame.

Additional Settings

Customize your input with more control.

Describe content to avoid in the generated video.

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.

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 258.416 seconds
Logs (1 lines)

Model Example Requests

Examples

Example output 1Example output 2Example output 3

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 Text to Video API

Wan 2.7 Text to Video is a text-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/text-to-video

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/text-to-video \
  -H "Authorization: Key $MRUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Generate a multi-shot video. 0-6s: a lighthouse beam sweeping slowly across black storm water at night, rain streakin…",
    "duration": 12,
    "resolution": "720P",
    "aspect_ratio": "16:9",
    "negative_prompt": "blurry, warped horizon, low-quality texture, on-screen text, watermark",
    "enable_prompt_expansion": false,
    "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/text-to-video/requests/$REQUEST_ID/status" \
  -H "Authorization: Key $MRUN_API_KEY"
curl "https://queue.modelrunner.run/wan-video/wan/v2.7/text-to-video/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/text-to-video", {
  input: {
    "prompt": "Generate a multi-shot video. 0-6s: a lighthouse beam sweeping slowly across black storm water at night, rain streakin…",
    "duration": 12,
    "resolution": "720P",
    "aspect_ratio": "16:9",
    "negative_prompt": "blurry, warped horizon, low-quality texture, on-screen text, watermark",
    "enable_prompt_expansion": false
  },
});
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/text-to-video",
    headers=headers,
    json={
      "prompt": "Generate a multi-shot video. 0-6s: a lighthouse beam sweeping slowly across black storm water at night, rain streakin…",
      "duration": 12,
      "resolution": "720P",
      "aspect_ratio": "16:9",
      "negative_prompt": "blurry, warped horizon, low-quality texture, on-screen text, watermark",
      "enable_prompt_expansion": false
    },
).json()

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

Input parameters

Input parameters of Wan 2.7 Text to Video
NameTypeRequiredDescription
promptstringyesText description of the video to generate.
resolutionenumnoOutput video resolution. 720P bills at $0.10 per second of finished video; 1080P (default) bills at $0.15 per second. One of: 720P, 1080P. Default: "1080P".
durationintegernoLength of the generated video in seconds (2-15). Default: 5.
aspect_ratioenumnoThe aspect ratio of the generated video frame. One of: 16:9, 9:16, 1:1, 4:3, 3:4. Default: "16:9".
negative_promptstringnoDescribe content to avoid in the generated video.
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 Text to Video from Claude & Cursor (MCP)

Point Claude Code, Claude Desktop, Cursor, or any MCP client at the ModelRunner MCP server and Wan 2.7 Text to Video 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/text-to-video.

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/text-to-video on ModelRunner to generate video”. MCP setup guide.

Model Details

Model Details

Wan 2.7 turns a written prompt into a 2-15 second video clip that arrives with its own soundtrack — background music or sound effects generated to match what is happening on screen, in the same pass as the picture. Shot structure is driven entirely by prompt language: ask for a multi-shot video, or describe two or three shots with timestamps, and the cuts are rendered without any separate shot-type control. Pick 720P for drafts or 1080P for delivery, set a clip length anywhere from 2 to 15 seconds, and choose a 16:9, 9:16, 1:1, 4:3 or 3:4 frame to match landscape, vertical or square delivery.

## Best for - Short scenes that need sound as well as picture, with background music or sound effects generated in the same pass - Multi-shot sequences described in a single prompt — "generate a multi-shot video", or shots called out with timestamps - Vertical 9:16 and square 1:1 social clips, or 16:9 landscape b-roll, from text alone - Single takes up to 15 seconds long, without stitching shorter clips together - Concepting and storyboarding, where you iterate at 720P and re-run the keeper at 1080P

## Choose another model when - You want to animate an existing photo or starting frame — this model takes text only, with no reference image, video or audio input, so use an image-to-video model - You need a silent clip — audio is always generated and there is no documented way to switch it off - You need clips longer than 15 seconds, or frame-accurate timeline control - Your prompt is not in Chinese or English, or runs past 5,000 characters, beyond which it is truncated

## Tips - Write shot structure into the prompt itself — "generate a multi-shot video", or "0-3s: …, 3-6s: …" — rather than looking for a shot-type control - Concrete motion verbs ("slowly pans", "rushes forward") translate well to on-screen movement - `resolution` affects cost: 720P bills at $0.10 per second of finished video and 1080P (the default) at $0.15, so iterate at 720P - `enable_prompt_expansion` is on by default and rewrites your prompt for richer detail — it suits short prompts but adds some processing time; disable it to follow your exact wording

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

const result = await modelrunner.subscribe("wan-video/wan/v2.7/text-to-video", { input: { prompt: "Generate a multi-shot video: a lighthouse beam sweeping over dark water, then a close-up of waves breaking on rocks", resolution: "1080P", duration: 8, aspect_ratio: "16:9", }, }); ```