Skip to main content
wan-video avatar

Wan 2.7 Text to Video API

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

Generate cinematic, high-fidelity video from a text prompt with smooth, coherent motion and strong prompt adherence, at 720p or 1080p.

Priced by resolution

Model Input

Input

Text description of the video to generate.

Output video resolution. 720p bills at $0.10/second; 1080p (default) bills at $0.15/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. 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 89.476 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 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": "A hawk soaring over a vast canyon at sunset, wings outstretched against a blazing orange sky, slow cinematic pull-back",
    "duration": 4,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "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/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": "A hawk soaring over a vast canyon at sunset, wings outstretched against a blazing orange sky, slow cinematic pull-back",
    "duration": 4,
    "resolution": "720p",
    "aspect_ratio": "16:9",
    "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/text-to-video",
    headers=headers,
    json={
      "prompt": "A hawk soaring over a vast canyon at sunset, wings outstretched against a blazing orange sky, slow cinematic pull-back",
      "duration": 4,
      "resolution": "720p",
      "aspect_ratio": "16:9",
      "enable_prompt_expansion": true
    },
).json()

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

Input parameters

NameTypeRequiredDescription
promptstringyesText description of the video to generate.
resolutionenumnoOutput video resolution. 720p bills at $0.10/second; 1080p (default) bills at $0.15/second. Default: "1080p".
durationintegernoLength of the generated video in seconds (2-15). Default: 5.
aspect_ratioenumnoThe aspect ratio of the generated video frame. 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. 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 cinematic, high-fidelity video clip with smooth, coherent motion and strong adherence to what you describe. From Alibaba's Wan family, it is tuned for fast, high-quality text-to-video where the subject, action, and scene in your prompt translate clearly to the screen. Pick 720p for faster, cheaper generation or 1080p for a sharper result, set a clip length from 2 to 15 seconds, and choose a 16:9, 9:16, 1:1, 4:3, or 3:4 aspect ratio to match landscape, vertical, or square delivery.

## Best for - Turning a single descriptive prompt into a polished establishing or hero shot - Social-ready vertical (9:16) clips and square (1:1) loops from text alone - Cinematic landscape (16:9) b-roll with camera motion and atmospheric detail - Quick concepting and storyboarding where you iterate on a prompt to dial in the action

## Choose another model when - You want to animate an existing photo or starting frame rather than generate from text alone — use an image-to-video model - You need a single still image, not motion — use a text-to-image model - You need clips longer than 15 seconds or frame-by-frame timeline control — use a dedicated long-form video tool

## Tips - Describe the subject, the action, and the setting in one coherent sentence; concrete motion verbs ("slowly pans", "rushes forward") translate well to on-screen movement - `resolution` affects cost: 720p bills at $0.10/second and 1080p (the default) at $0.15/second, so drop to 720p for drafts and iteration - Use `negative_prompt` to suppress recurring artifacts such as blur, warping, or low-quality texture - `enable_prompt_expansion` (on by default) rewrites your prompt with an LLM for richer detail; disable it when you want the model to follow your exact wording - Match `aspect_ratio` to where the clip will run — 9:16 for stories/reels, 16:9 for landscape, 1:1 for feed loops

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: "A serene mountain lake reflecting clouds at golden hour, gentle ripples on the water", resolution: "1080p", duration: 5, aspect_ratio: "16:9", }, }); ```