Nexus
All models
Alibaba Video Available

Wan 2.7 Reference to Video

Use this endpoint to create a new reference-to-video generation task.

Image to Video

From 400 credits (≈ ₹400.00) per request.

Parameters

ParameterTypeDescription
promptRequired string Text prompt. Required. Describes the desired elements and visual features in the generated video. Supports Chinese and English. Maximum length: 5000 characters.
max length 5000
negative_prompt string Optional negative prompt describing what should not appear in the video. Supports Chinese and English. Maximum length: 500 characters.
max length 500
reference_image array<string> 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.
reference_video array<string> 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.
first_frame string 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.
format: uri
reference_voice string 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 priority Audio limits: - Formats: `wav`, `mp3` - Duration: `1` to `10` seconds - File size: up to `30MB`
format: uri
resolution string Output video resolution tier. Available values: `720p`, `1080p`. Default value: `1080p`.
one of: "720p", "1080p" · default "1080p"
aspect_ratio string 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
one of: "16:9", "9:16", "1:1", "4:3", "3:4" · default "16:9"
duration integer Output video duration in seconds. Valid range is an integer from `2` to `10`. Default value: `5`.
min 2 · max 10 · default 5
prompt_extend boolean 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
watermark boolean 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
seed integer Random seed. Range: `0-2147483647`. If omitted, the system generates one automatically.
min 0 · max 2147483647
nsfw_checker boolean Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model.

What you get back

Files arrive in output.files[] as private links that expire, with their type and size.

Use it from your code

# 1. Create the task
curl https://nexus.promptscenes.in/api/v1/tasks \
  -H "Authorization: Bearer $NEXUS_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "model": "wan-2.7-reference-to-video",
    "input": {
        "prompt": "A cinematic shot of a lighthouse at dawn",
        "resolution": "1080p",
        "aspect_ratio": "16:9",
        "duration": 5,
        "prompt_extend": true,
        "watermark": false
    },
    "callback_url": "https://your-app.com/webhooks/nexus"
}'

# 2. Poll for the result
curl https://nexus.promptscenes.in/api/v1/tasks/TASK_ID \
  -H "Authorization: Bearer $NEXUS_API_KEY"
import os, time, uuid, requests

API = "https://nexus.promptscenes.in/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['NEXUS_API_KEY']}"}

task = requests.post(
    f"{API}/tasks",
    headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
    json={
        "model": "wan-2.7-reference-to-video",
        "input": {
            "prompt": "A cinematic shot of a lighthouse at dawn",
            "resolution": "1080p",
            "aspect_ratio": "16:9",
            "duration": 5,
            "prompt_extend": True,
            "watermark": False,
        },
        "callback_url": "https://your-app.com/webhooks/nexus",
    },
).json()

while task["status"] not in ("succeeded", "failed", "cancelled"):
    time.sleep(3)
    task = requests.get(f"{API}/tasks/{task['id']}", headers=HEADERS).json()

print(task["status"], task.get("output"))
const API = "https://nexus.promptscenes.in/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.NEXUS_API_KEY}`,
  "Content-Type": "application/json",
};

let task = await fetch(`${API}/tasks`, {
  method: "POST",
  headers: { ...headers, "Idempotency-Key": crypto.randomUUID() },
  body: JSON.stringify({
      "model": "wan-2.7-reference-to-video",
      "input": {
          "prompt": "A cinematic shot of a lighthouse at dawn",
          "resolution": "1080p",
          "aspect_ratio": "16:9",
          "duration": 5,
          "prompt_extend": true,
          "watermark": false
      },
      "callback_url": "https://your-app.com/webhooks/nexus"
  }),
}).then((r) => r.json());

while (!["succeeded", "failed", "cancelled"].includes(task.status)) {
  await new Promise((r) => setTimeout(r, 3000));
  task = await fetch(`${API}/tasks/${task.id}`, { headers }).then((r) => r.json());
}
console.log(task.status, task.output);

Request

{
    "model": "wan-2.7-reference-to-video",
    "input": {
        "prompt": "A cinematic shot of a lighthouse at dawn",
        "resolution": "1080p",
        "aspect_ratio": "16:9",
        "duration": 5,
        "prompt_extend": true,
        "watermark": false
    }
}

Response

{
    "id": "6f1c…",
    "object": "task",
    "model": "wan-2.7-reference-to-video",
    "status": "succeeded",
    "output": {
        "files": [
            {
                "url": "https://…signed…",
                "mime": "…",
                "size": 0
            }
        ]
    },
    "estimated_cost": "…",
    "charged": "…"
}