Wan 2.7 - Reference to Video
Endpoint
POST /videos/generations
Full URL: https://modelfold.ai/v1/videos/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.
Input parameters for the reference-to-video task.
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name used for generation. This field is required. This endpoint must use the wan/2-7-r2v model. Default:"wan/2-7-r2v"。 Allowed values:wan/2-7-r2v。 Example:wan/2-7-r2v。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. Text prompt. Required. Describes the desired elements and visual features in the generated video. Supports Chinese and English. Maximum length: 5000 characters. maxLength: 2000. Example:Image 1 is eating, while video 1 and image 2 are singing beside it.。 |
negative_prompt | string | No | Optional negative prompt describing what should not appear in the video. Supports Chinese and English. Maximum length: 500 characters. maxLength: 500. Example:low resolution, errors, worst quality, low quality, malformed, extra fingers, bad proportions。 |
reference_image | array<string> | No | Array of reference image URLs. At least one of reference_image or reference_video must be provided. The total number of images and videos cannot exceed 5. maxItems: 5. |
reference_video | array<string> | No | Array of reference video URLs. At least one of reference_image or reference_video must be provided. The total number of images and videos cannot exceed 5. maxItems: 5. |
first_frame | string | No | First frame image URL. At most one image can be provided. If supplied, aspect_ratio is ignored and the output uses a ratio close to the first frame image. Example:https://example.com/demo/first-frame.png。 |
reference_voice | string | No | Audio URL used to specify the voice timbre of the subject in the reference material. Rules: - If reference_video contains audio and reference_voice is not provided, the original video audio is used by default- If both reference_video and reference_voice are provided, reference_voice takes priorityAudio limits: - Formats: wav, mp3- Duration: 1 to 10 seconds- File size: up to 30MB Example:https://example.com/demo/reference-voice.mp3。 |
resolution | string | No | Output video resolution tier. Available values: 720p, 1080p. Default value: 1080p. Default:"1080p"。 Allowed values:720p / 1080p。 Example:1080p。 |
aspect_ratio | string | No | Output video aspect ratio. Effective logic: - If first_frame is not provided: the video is generated using the specified aspect_ratio- If first_frame is provided: aspect_ratio is ignored and the output uses a ratio close to the first frame image Default:"16:9"。 Allowed values:16:9 / 9:16 / 1:1 / 4:3 / 3:4。 Example:16:9。 |
duration | integer | No | Output video duration in seconds. Valid range is an integer from 2 to 10. Default value: 5. Default:5。 minimum: 2. maximum: 10. Example:5。 |
prompt_extend | boolean | No | Whether to enable prompt rewriting. When enabled, the model expands the input prompt. This usually works better for short prompts but increases processing time. Default:true。 Example:true。 |
watermark | boolean | No | Whether to add a watermark. The watermark is placed in the lower-right corner of the video with the fixed text "AI generated". Default:false。 Example:false。 |
seed | integer | No | Random seed. Range: 0-2147483647. If omitted, the system generates one automatically. minimum: 0. maximum: 2147483647. Example:0。 |
nsfw_checker | boolean | No | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
Request Example
bash
curl -X POST "https://modelfold.ai/v1/videos/generations" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan/2-7-r2v",
"prompt": "Image 1 is eating, while video 1 and image 2 are singing beside it.",
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 5,
"prompt_extend": true,
"watermark": false
}'json
{
"model": "wan/2-7-r2v",
"prompt": "Image 1 is eating, while video 1 and image 2 are singing beside it.",
"resolution": "1080p",
"aspect_ratio": "16:9",
"duration": 5,
"prompt_extend": true,
"watermark": false
}Response
200 — Generation completed. usage contains actual billing details; result URLs are illustrative.
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.mp4"
}
],
"usage": {}
}