Wan 2.6 Text To Video Serverless API

Transforms text and audio into high-quality cinematic videos with seamless storytelling and synchronization.

~187.23s
$0.625 - $2.81 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/wan-2.6-t2v"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "size": "1280*720",
12    "prompt": "Humorous but premium mini-trailer: a rugged caveman explorer sparks \"evolution\" by grunting simple commands that instantly upgrade his world and morph his own form through the ages. Extreme photoreal 4K, cinematic lighting, subtle film grain, smooth camera. No subtitles, no UI, no watermark.\nShot 1 [0-3s] Macro close-up on the caveman's weathered face and hairy knuckles clutching a jagged stone axe in a misty prehistoric dawn. He grunts deeply: \"Better!\"\nShot 2 [3-6s] Hard cut: Bustling ancient forge at golden hour, sparks flying. The caveman, now in leather tunic with a bronze sword, hammers metal confidently. Camera dollies in as he bellows: \"Faster!\"\nShot 3 [6-10s] Hard cut: Steampunk factory amid rainy industrial night, gears whirring. He transforms into a suited inventor with goggles, cranking a massive machine that hums to life. Slow zoom on his evolving eyes as he commands: \"Smarter!\"\nShot 4 [10-15s] Hard cut: Futuristic AI lab bathed in neon glow, holographic interfaces pulsing. The caveman, sleek in neural-linked exosuit, interfaces with a glowing orb; his form subtly digitizes. He smiles knowingly: \"Evolved. What's next?\"",
13    "duration": 5,
14    "multi_shots": false,
15    "negative_prompt": "low resolution, error, worst quality, low quality, defects",
16    "enable_prompt_expansion": true
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/wan-2.6-t2v

Parameters

promptrequired
string

Text prompt for video generation

audiooptional
string (uri)

Audio file (wav/mp3, 3-30s, ≤15MB) for voice/music synchronization

Default: null
durationoptional
integer

An enumeration.

Default: 5
Allowed values :
51015
enable_prompt_expansionoptional
boolean

If set to true, the prompt optimizer will be enabled

Default: true
multi_shotsoptional
boolean

Enable intelligent multi-shot segmentation (only active when enable_prompt_expansion is enabled). True enables multi-shot segmentation, false generates single-shot content.

Default: false
negative_promptoptional
string

Negative prompt to avoid certain elements

Default: ""
seedoptional
integer

Random seed for reproducible generation

Default: null
sizeoptional
string

An enumeration.

Default: "1280*720"
Allowed values :
"1280*720""720*1280""1920*1080""1080*1920"

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