Wan 2.7 Reference to Video Serverless API
Character-consistent multi-subject videos from reference images.
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) 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
https://api.segmind.com/v1/wan2.7-r2vParameters
promptrequiredstringDescribe scene; reference characters as Image1, Image2, Video1.
"Image1 walks through a lush green garden with blooming flowers, smiling warmly at the camera, golden hour lighting"durationoptionalintegerVideo length in seconds, 2-15. Shorter for clips.
5negative_promptoptionalstringElements to exclude from output. Use for artifact suppression.
"blurry, low quality, distorted, watermark"reference_imagesoptionalstring (uri)Character reference image URL. Maps to Image1, Image2 in prompt.
"https://segmind-resources.s3.amazonaws.com/input/wan2.7-r2v-ref-image.jpg"reference_videosoptionalstring (uri)Character reference video URL. Maps to Video1, Video2 in prompt.
nullreference_voiceoptionalstring (uri)Audio URL to clone character voice. Max 10 seconds.
nullresolutionoptionalstringOutput resolution. 720P faster; 1080P for final deliverables.
"720P""720P""1080P"seedoptionalintegerFixed seed for reproducible output. Null for random variation.
42Response Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out