Video GenerationWan
Wan 2.7 R2V
Reference-driven video generation with Wan 2.7 — guide motion, subjects, or style with up to five reference images and videos.
POST /v2/videos/generate — model: "wan-2.7-r2v"
Reference-to-video (R2V) generation. Supply up to five reference images and/or up to five reference videos and Wan 2.7 produces a new clip that respects them as visual anchors. Useful for character consistency, style transfer, and motion guidance. Audio is auto-generated.
You must provide at least one reference (reference_images or reference_videos).
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
wan27R2vParams.reference_images | string[] | No* | — | Up to 5 reference image URLs. |
wan27R2vParams.reference_videos | string[] | No* | — | Up to 5 reference video URLs. |
wan27R2vParams.shot_type | string | No | — | "single" or "multi" — multi-shot narrative segmentation. |
wan27R2vParams.resolution | string | No | "1080p" | Output resolution: "720p" or "1080p". |
wan27R2vParams.aspect_ratio | string | No | — | One of "16:9", "9:16", "1:1", "4:3", "3:4". |
wan27R2vParams.duration | number | No | 5 | Video duration in seconds (integer, 2–10). |
wan27R2vParams.negative_prompt | string | No | — | Elements to avoid in the generated video. |
wan27R2vParams.seed | number | No | — | Random seed for reproducible generation. |
* At least one of reference_images or reference_videos is required.
Credit cost
| Variant | Credits / second |
|---|---|
default (any resolution) | 17 |
A 6-second clip therefore costs 17 × 6 = 102 credits.
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "She walks across a moonlit Tokyo crosswalk in the rain",
"model": "wan-2.7-r2v",
"wan27R2vParams": {
"reference_images": [
"https://example.com/character.jpg",
"https://example.com/style.jpg"
],
"duration": 6,
"resolution": "1080p",
"shot_type": "single"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "She walks across a moonlit Tokyo crosswalk in the rain",
"model": "wan-2.7-r2v",
"wan27R2vParams": {
"reference_images": [
"https://example.com/character.jpg",
"https://example.com/style.jpg",
],
"duration": 6,
"resolution": "1080p",
"shot_type": "single",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "She walks across a moonlit Tokyo crosswalk in the rain",
model: "wan-2.7-r2v",
wan27R2vParams: {
reference_images: [
"https://example.com/character.jpg",
"https://example.com/style.jpg",
],
duration: 6,
resolution: "1080p",
shot_type: "single",
},
}),
});
console.log(await response.json());Try it
POST
/v2/videos/generateTry it