Wan 2.7 Reference to Video Serverless API

Generate character-consistent videos from reference images with multi-subject support and voice cloning up to 1080P.

~329.51s
$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

Text prompt describing the scene, referencing characters as Image1, Image2, Video1, etc. For single character: 'Image1 walks through a park smiling.' For multi-character: 'Image1 and Image2 shake hands in an office.'

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

Length of the generated video in seconds (2-15). Use 3-5s for social clips and product demos; 10-15s for narrative scenes or explainer segments.

Default: 5
negative_promptoptional
string

Describe what to exclude from the video. Use for common artifacts like 'blurry, distorted face, extra limbs' or to block unwanted styles.

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

Public image URL of a character reference. Each image maps to Image1, Image2, etc. in the prompt. Use clear, front-facing portraits for best identity consistency. Add up to 5 images.

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

Public video URL of a character reference clip. Each video maps to Video1, Video2, etc. in the prompt. Short clips (3-10s) with a single subject work best. Add up to 5 videos.

Default: null
reference_voiceoptional
string (uri)

Public URL of a 1-10 second audio clip to clone the character's voice timbre. Ideal for dubbed content; use a clean, noise-free recording for best results.

Default: null
resolutionoptional
string

Output video resolution. 720P is faster and lower cost; use 1080P for final deliverables, client previews, or broadcast-quality output.

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

Set a fixed seed integer for reproducible outputs. Leave null for random variation; reuse a known seed to regenerate the same result with tweaked prompts.

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