Skip to content
Open CastalyConsole

Video

wan2.7-r2v-nsfw API

Use the exact wan2.7-r2v-nsfw model ID through Modelflare asynchronous video routing.

Use the exact model ID wan2.7-r2v-nsfw. The model field must match this page exactly.

Sample outputwan2.7-r2v-nsfwPOST /v1/videos5.0s

Parameters: duration=5resolution=1080Pratio=16:9Reference image

Prompt: One continuous take, no cuts. Keep the woman, the white bikini, the tortoiseshell glasses, the striped towel and the poolside exactly as in the first frame. She pushes up off her forearms and turns slowly onto her side and then square to the lens, settling back on one hip; as she comes round she runs one hand back through her damp hair and lets it fall over one shoulder, then faces the camera front on, chin slightly up, still looking over the top of her glasses with a relaxed smile. The camera holds its low close position and eases back a little as she turns, keeping her framed from shoulders to hips. Warm midday sun stays from the left, bright bounce off the pale deck. Real weight and inertia, natural hair and fabric movement, no text.

This sample is deliberately mild. It is not the content limit of this model ID.

Request that produced this sample, with the input media URL replaced
{
"model": "wan2.7-r2v-nsfw",
"input": {
"prompt": "One continuous take, no cuts. Keep the woman, the white bikini, the tortoiseshell glasses, the striped towel and the poolside exactly as in the first frame. She pushes up off her forearms and turns slowly onto her side and then square to the lens, settling back on one hip; as she comes round she runs one hand back through her damp hair and lets it fall over one shoulder, then faces the camera front on, chin slightly up, still looking over the top of her glasses with a relaxed smile. The camera holds its low close position and eases back a little as she turns, keeping her framed from shoulders to hips. Warm midday sun stays from the left, bright bounce off the pale deck. Real weight and inertia, natural hair and fabric movement, no text.",
"media": [
{
"type": "reference_image",
"url": "https://example.com/input-image.png"
}
]
},
"parameters": {
"duration": 5,
"resolution": "1080P",
"ratio": "16:9"
}
}

Use a Modelflare API key with https://modelflare.dev/v1. The gateway entry point is POST /v1/videos.

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
Terminal windowbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-r2v-nsfw",
"input": {"prompt": "The subject in Image 1 walks through the street from Video 1.", "media": [{"type": "reference_image", "url": "https://example.com/reference.png"}, {"type": "reference_video", "url": "https://example.com/reference.mp4"}]},
"parameters": {"resolution": "1080P", "ratio": "16:9", "duration": 5, "prompt_extend": false, "watermark": false}
}'

Save the task ID. Poll GET /v1/videos/{task_id} and download with GET /v1/videos/{task_id}/content. Result URLs may expire, so transfer the file promptly.

Terminal windowbash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Wan commonly uses input and parameters; frame-guided and reference-media modes must not be mixed.

Wan2.7 R2V uses reference_image / reference_video media and may attach reference_voice. Do not mix this workflow with first_frame / last_frame roles.

Field Required Notes
model Yes wan2.7-r2v-nsfw
input.prompt Yes Describe the scene and reference media using the documented syntax
input.media[] Yes At least one reference_image or reference_video
input.media[].reference_voice No Public WAV/MP3 URL for voice characteristics
parameters.resolution No 720P / 1080P (default 1080P)
parameters.ratio No 16:9 / 9:16 / 1:1 / 4:3 / 3:4 (ignored when first_frame is present)
parameters.duration No Use the shorter duration limit when a reference video is present
parameters.prompt_extend No Set false when this dedicated model contract requires it
parameters.watermark No Whether to add a watermark
parameters.seed No Optional random seed

R2V requires at least one reference_image or reference_video, with at most five reference images/videos combined. One first_frame and a reference_voice may be attached; the duration limit is shorter when a reference video is present. The -nsfw model requires prompt_extend: false.

Terminal windowbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-r2v-nsfw",
"input": {"prompt": "让图像主体沿视频动作自然移动", "media": [
{"type": "reference_image", "url": "https://example.com/subject.png"},
{"type": "reference_video", "url": "https://example.com/motion.mp4"}
]},
"parameters": {"resolution": "1080P", "duration": 8, "prompt_extend": false}
}'

Invalid model parameters return a 4xx with a request ID. An asynchronous task can also enter failed after creation succeeds; use error_code and error_message from the poll response as the final task reason. Do not retry the same request with a different JSON shape.

This page covers Modelflare model generation and editing calls. Search or map enrichment, voice management, and element-library management are resource APIs outside this public model-call surface and are not required request fields.

This model uses per-second video billing. See the model pricing page for the current customer price, reference list price, and complete specification.

Model ID Difference
wan2.7-r2v-nsfw The model documented on this page.
wan2.7-r2v The base model. Same endpoint, request contract, and billing unit; only the model ID changes — see its own page, and the pricing page for price and availability.
Media contract · v1

Contract ID: media.wan2-7-r2v-nsfw.v1Adapter: video.wan.r2v.v1@v1Fingerprint: abeee790a5767e9ad4bd99d50040f32673b4ae1fe33bb22a58487d9fa07865b9

Official source: Alibaba Cloud Model Studio

Contract parameters

Intent fieldControlOptions
ratioselect16:9 / 9:16 / 1:1 / 4:3 / 3:4
resolutionselect720p / 1080p
durationselect2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15

Supported capability

  • allowed_values · ratio · 16:9, 9:16, 1:1, 4:3, 3:4
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
  • required_assets · reference_asset_ids
  • max_assets · reference_asset_ids · 6

Structured request example

reference

Intent

{
  "duration": 2,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "reference_asset_ids": [
    "asset_example"
  ],
  "resolution": "720p"
}

Provider request

{
  "input": {
    "media": [
      {
        "type": "reference_image",
        "url": "https://example.com/reference.png"
      }
    ],
    "prompt": "A red paper kite over a quiet harbour at dusk."
  },
  "model": "wan2.7-r2v-nsfw",
  "parameters": {
    "duration": 2,
    "resolution": "720P"
  }
}