# Wan 2.7 Text to Video > Wan 2.7 is the latest generation AI video model, delivering enhanced motion smoothness, superior scene fidelity, and greater visual coherence. ## Overview - **Endpoint**: `https://api.runflow.io/v1/run/alibaba/wan/v2.7/text-to-video` - **Model ID**: `alibaba/wan/v2.7/text-to-video` - **Provider**: Alibaba - **License**: commercial - **Last Updated**: 2026-04-08 ## Pricing - **Base price**: $0.1/second - **Note**: Per second of video ## Input Schema ### `prompt` (string, required) Text prompt describing the desired video. Max 5000 characters. ### `audio_url` (file, optional) URL of driving audio. Supports WAV and MP3. Duration: 3-30s. Max 15 MB. If not provided, the model auto-generates matching background music. ### `aspect_ratio` (string, optional) Aspect ratio of the generated video. - **Default**: `16:9` - **Options**: `16:9`, `9:16`, `1:1`, `4:3`, `3:4` ### `resolution` (string, optional) Output video resolution tier. - **Default**: `1080p` - **Options**: `720p`, `1080p` ### `duration` (string, optional) Output video duration in seconds (2-15). - **Default**: `5` - **Options**: `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15` ### `negative_prompt` (string, optional) Content to avoid in the video. Max 500 characters. ### `enable_prompt_expansion` (boolean, optional) Enable intelligent prompt rewriting. - **Default**: `true` ### `seed` (integer, optional) Random seed for reproducibility (0-2147483647). ### `enable_safety_checker` (boolean, optional) Enable content moderation for input and output. - **Default**: `true` ## Usage Examples ### cURL ```bash curl -X POST https://api.runflow.io/v1/run/alibaba/wan/v2.7/text-to-video \ -H "Authorization: Bearer $RUNFLOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A professional headshot, soft studio lighting", "audio_url": "https://example.com/input.mp3" }' ``` ### Python ```python import requests response = requests.post( "https://api.runflow.io/v1/run/alibaba/wan/v2.7/text-to-video", headers={"Authorization": "Bearer RUNFLOW_API_KEY"}, json={ "prompt": "A professional headshot, soft studio lighting", "audio_url": "https://example.com/input.mp3", }, ) data = response.json() print(data["video"]["url"]) ``` ### JavaScript ```javascript const response = await fetch( "https://api.runflow.io/v1/run/alibaba/wan/v2.7/text-to-video", { method: "POST", headers: { "Authorization": "Bearer RUNFLOW_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "A professional headshot, soft studio lighting", audio_url: "https://example.com/input.mp3", }), } ); const data = await response.json(); console.log(data.video.url); ``` ## Additional Resources - [Playground](https://www.runflow.io/models/alibaba/wan/v2.7/text-to-video) - [API Reference](https://www.runflow.io/models/alibaba/wan/v2.7/text-to-video/api) - [Documentation](https://www.runflow.io/docs)