ApiframeApiframe Docs
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.

Use in Apiframe Studio

POST /v2/videos/generatemodel: "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

ParameterTypeRequiredDefaultDescription
wan27R2vParams.reference_imagesstring[]No*Up to 5 reference image URLs.
wan27R2vParams.reference_videosstring[]No*Up to 5 reference video URLs.
wan27R2vParams.shot_typestringNo"single" or "multi" — multi-shot narrative segmentation.
wan27R2vParams.resolutionstringNo"1080p"Output resolution: "720p" or "1080p".
wan27R2vParams.aspect_ratiostringNoOne of "16:9", "9:16", "1:1", "4:3", "3:4".
wan27R2vParams.durationnumberNo5Video duration in seconds (integer, 2–10).
wan27R2vParams.negative_promptstringNoElements to avoid in the generated video.
wan27R2vParams.seednumberNoRandom seed for reproducible generation.

* At least one of reference_images or reference_videos is required.

Credit cost

VariantCredits / 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

On this page