Wan 2.7 Text to Video Serverless API

Generate cinematic 1080P videos from text with audio sync, multi-shot control, and 15-second duration via Wan 2.7.

~351.22s
$0.625 - $0.938 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/wan2.7-t2v"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "A majestic golden eagle soaring over snow-capped mountain peaks at sunrise, cinematic wide angle shot, dramatic lighting, ultra HD, slow motion",
12    "negative_prompt": "blurry, low quality, distorted, watermark",
13    "resolution": "720P",
14    "duration": 5,
15    "ratio": "16:9",
16    "seed": 42
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22    result = response.json()
23    print(json.dumps(result, indent=2))
24else:
25    print(f"Error: {response.status_code}")
26    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/wan2.7-t2v

Parameters

promptrequired
string

Describe the scene, subjects, motion, and camera style (e.g., cinematic drone shot, slow pan). Include lighting and mood for richer outputs. Max 5,000 characters.

Default: "A majestic golden eagle soaring over snow-capped mountain peaks at sunrise, cinematic wide angle shot, dramatic lighting, ultra HD, slow motion"
audio_urloptional
string (uri)

URL to an audio file (MP3/WAV) to synchronize with the video.

Default: null
durationoptional
integer

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

Default: 5
negative_promptoptional
string

List elements to exclude from the output (e.g., blurry, watermark, distorted faces).

Default: "blurry, low quality, distorted, watermark"
ratiooptional
string

Aspect ratio of the output video.

Default: "16:9"
Allowed values :
"16:9""9:16""1:1""4:3""3:4"
resolutionoptional
string

Output resolution tier.

Default: "720P"
Allowed values :
"720P""1080P"
seedoptional
integer

Integer seed for reproducible outputs.

Default: 42

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out