Wan 2.2 Text to Video Fast Serverless API

Wan2.2 transforms text and images into high-quality video clips with cinematic flair.

~96.30s
$0.063 - $0.125 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/wan-2.2-t2v-fast"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "A sophisticated Korean teacher in her early 30s, with sleek, black hair tied in a high bun and sharp, cat-like eyes, stands at the front of the room. She wears a tailored blazer and pencil skirt, exuding authority. As she writes on the chalkboard, the chalk’s texture against her fingers sends a jolt of pleasure through her. The camera lingers on her face—her composed expression cracks as her lips tremble, her eyes flutter, and unaware figures remain in the background.",
12    "go_fast": true,
13    "num_frames": 81,
14    "resolution": "480p",
15    "aspect_ratio": "16:9",
16    "sample_shift": 12,
17    "frames_per_second": 16,
18    "high_noise_lora_scale": 1,
19    "low_noise_lora_scale": 1
20}
21
22response = requests.post(url, headers=headers, json=data)
23
24if response.status_code == 200:
25    result = response.json()
26    print(json.dumps(result, indent=2))
27else:
28    print(f"Error: {response.status_code}")
29    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/wan-2.2-t2v-fast

Parameters

promptrequired
string

Prompt describes the scene. Choose vivid and clear descriptions for best results.

aspect_ratiooptional
string

Aspect ratio of the video. 16:9 is standard, 9:16 for vertical.

Default: "16:9"
Allowed values :
"16:9""9:16"
frames_per_secondoptional
integer

Video FPS. 16 fps is balanced; increase for smoother motion.

Default: 16Range: 5 - 24
go_fastoptional
boolean

Toggles speed of video creation. Set to true for quicker outputs.

Default: true
high_noise_loraoptional
string

URL to high noise LoRA model for style customization. Supports arbitrary .safetensors URLs from the Internet.

Default: null
high_noise_lora_scaleoptional
number

Controls high noise LoRA influence strength. 0.0 = disabled, 1.0 = full strength, 2.0 = maximum.

Default: 1Range: 0 - 2
low_noise_loraoptional
string

URL to low noise LoRA model for style customization. Supports arbitrary .safetensors URLs from the Internet.

Default: null
low_noise_lora_scaleoptional
number

Controls low noise LoRA influence strength. 0.0 = disabled, 1.0 = full strength, 2.0 = maximum.

Default: 1Range: 0 - 2
negative_promptoptional
string

Text describing what you want to avoid in the video. Helps improve quality by excluding unwanted elements.

Default: ""
num_framesoptional
integer

Total frames in the video. 81 frames offer optimal quality.

Default: 81Range: 81 - 100
resolutionoptional
string

Select video resolution. Choose 480p for faster renders, 720p for quality.

Default: "480p"
Allowed values :
"480p""720p"
sample_shiftoptional
number

Controls frame sample shift. Increase for more motion variation.

Default: 12Range: 1 - 20
seedoptional
integer

Random seed for reproducibility. Use a fixed seed for consistent outputs or leave blank for randomness.

Default: null

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