Wan 2.7 Reference to Video Serverless API

Character-consistent multi-subject videos from reference images.

~428.07s
$0.625 - $0.938 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/wan2.7-r2v"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "Image1 walks through a lush green garden with blooming flowers, smiling warmly at the camera, golden hour lighting",
12    "reference_images": "https://segmind-resources.s3.amazonaws.com/input/wan2.7-r2v-ref-image.jpg",
13    "negative_prompt": "blurry, low quality, distorted, watermark",
14    "resolution": "720P",
15    "duration": 5,
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-r2v

Parameters

promptrequired
string

Describe scene; reference characters as Image1, Image2, Video1.

Default: "Image1 walks through a lush green garden with blooming flowers, smiling warmly at the camera, golden hour lighting"
durationoptional
integer

Video length in seconds, 2-15. Shorter for clips.

Default: 5
negative_promptoptional
string

Elements to exclude from output. Use for artifact suppression.

Default: "blurry, low quality, distorted, watermark"
reference_imagesoptional
string (uri)

Character reference image URL. Maps to Image1, Image2 in prompt.

Default: "https://segmind-resources.s3.amazonaws.com/input/wan2.7-r2v-ref-image.jpg"
reference_videosoptional
string (uri)

Character reference video URL. Maps to Video1, Video2 in prompt.

Default: null
reference_voiceoptional
string (uri)

Audio URL to clone character voice. Max 10 seconds.

Default: null
resolutionoptional
string

Output resolution. 720P faster; 1080P for final deliverables.

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

Fixed seed for reproducible output. Null for random variation.

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