Wan 2.7 icon
Video by Alibaba

Wan 2.7 API

Alibaba Tongyi Lab's latest AI video model (Apr 2026), a four-mode suite covering text, image, and reference-to-video plus instruction-based editing, with a planning step, native audio, and first-and-last-frame control.

Integrate Wan 2.7 with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.

model: "wan-2.7"

What's special about Wan 2.7

A four-mode video suite

One model family handles text-to-video, image-to-video, reference-to-video, and prompt-based editing, so you can generate, continue, reference, and revise without switching tools.

A built-in thinking step

It interprets and plans your prompt before generating, building a structural understanding of the scene, which rewards clear direction on subject, lighting, camera, and mood.

Native synchronized audio

It generates ambient sound, lip-synced dialogue, and background music in a single pass, and can clone a voice from a supplied audio reference.

First-and-last-frame control

You set the starting and ending frames and the model generates smooth, coherent motion across everything in between.

Instruction-based editing

It takes an existing clip and a text instruction to change the scene, style, objects, action, or camera, applying local or global edits without re-rendering from scratch.

Multi-reference consistency

It accepts up to five image or video references to hold a character's identity and voice across shots, with physics-aware motion, 1080p output, and much faster inference than previous versions.

Made with Wan 2.7

A few outputs generated through the Wan 2.7 API on Apiframe.

A 5-second clip of a chef slicing vegetables in a modern kitchen, smooth left-to-right pan, cinematic lighting.

A 5-second image-to-video clip animating this product photo, slow turntable rotation, soft studio light.

A 5-second first-and-last-frame clip morphing a closed flower bud into a full bloom.

A 5-second reference-based clip keeping this character consistent as she walks through a busy market.

A 5-second clip of a drone ascending over a mountain river at sunset, orchestral background music.

Edit this 5-second clip, change the background to a rainy night and keep the subject and motion intact.

Overview

Endpoint
POST /v2/videos/generate
Model ID
wan-2.7
Params key
wan27Params
Modality
Video
Provider
Alibaba
Avg. completion
~180s

Capabilities

Aspect ratios16:9, 9:16, 1:1, 4:3, 3:4
Resolutions720p, 1080p
Durations2s, 3s, 4s, 5s, 6s, 7s, 8s, 9s, 10s, 11s, 12s, 13s, 14s, 15s
Image inputSupported
AudioSupported
Avg. time~180s

Quick start

Send a single POST /v2/videos/generate request with your API key to generate with Wan 2.7. The call returns a jobId you can poll or receive via webhook.

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": "a cinematic sunrise over a futuristic cityscape, smooth camera push-in",
        "model": "wan-2.7",
        "wan27Params": {
            "image": "https://example.com/input.jpg",
            "resolution": "720p",
            "first_clip": "https://example.com/input.jpg",
            "last_frame": "https://example.com/input.jpg"
        }
    }'
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": "a cinematic sunrise over a futuristic cityscape, smooth camera push-in",
        "model": "wan-2.7",
        "wan27Params": {
            "image": "https://example.com/input.jpg",
            "resolution": "720p",
            "first_clip": "https://example.com/input.jpg",
            "last_frame": "https://example.com/input.jpg"
        }
    },
)
print(response.json())  # { "jobId": "...", "status": "QUEUED" }
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": "a cinematic sunrise over a futuristic cityscape, smooth camera push-in",
    "model": "wan-2.7",
    "wan27Params": {
      "image": "https://example.com/input.jpg",
      "resolution": "720p",
      "first_clip": "https://example.com/input.jpg",
      "last_frame": "https://example.com/input.jpg"
    }
  }),
});
const { jobId } = await response.json();
console.log(jobId);

Response & job lifecycle

Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).

1. Submission response (202)

{
  "jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "status": "QUEUED"
}

2. Poll for the result

curl https://api.apiframe.ai/v2/jobs/JOB_ID \
  -H "X-API-Key: afk_your_api_key_here"
import requests, time

while True:
    job = requests.get(
        "https://api.apiframe.ai/v2/jobs/JOB_ID",
        headers={"X-API-Key": "afk_your_api_key_here"},
    ).json()
    if job["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)
print(job["result"])
let job;
do {
  await new Promise((r) => setTimeout(r, 2000));
  job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
    headers: { "X-API-Key": "afk_your_api_key_here" },
  }).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);

Input schema

Request parameters accepted by the Wan 2.7 endpoint. Model-specific options are nested under the params object shown below.

Parameter Type Required Default Allowed / range Description
prompt string required Text description of what to generate.
model string required "wan-2.7" "wan-2.7" The model identifier for this endpoint.
wan27Params.image string (URL) optional Use a still as the first frame.
wan27Params.first_clip string (URL) optional Optional 2–10s video to continue from. Mutually exclusive with first frame image.
wan27Params.last_frame string (URL) optional Optional final frame for first-and-last-frame generation. Requires an anchor (image or video).
wan27Params.resolution string optional "720p" "720p", "1080p" Resolution
wan27Params.negative_prompt string optional Negative prompt
wan27Params.audio string (URL) optional Optional audio track to drive the clip.
wan27Params.enable_prompt_expansion boolean optional false Let Wan rewrite your prompt for richer detail.
wan27Params.seed number optional step 1 Reuse a number to reproduce the same result.

Frequently Asked Questions

Common questions about the Wan 2.7 API.

What is Wan 2.7?

Alibaba Tongyi Lab's latest AI video model, released in April 2026 as a suite covering text, image, and reference-to-video plus editing.

What is Thinking Mode?

A planning step where the model interprets and structures your prompt before generating, so detailed direction produces more intentional results.

Does it generate audio?

Yes. It produces synchronized native audio, including ambient sound, lip-synced dialogue, and music, and supports voice cloning from a reference.

What is first-and-last-frame control?

You provide the start and end frames, and the model generates the motion between them.

Can it edit existing videos?

Yes. Instruction-based editing changes the scene, style, objects, or action through text, either locally or globally.

Where can you access it?

Through Apiframe, as well as Alibaba Cloud Model Studio, the Wan website, and major hosting partners.

Still have questions?

Start building with the Wan 2.7 API

Get your API key and integrate Wan 2.7 in minutes — Pay-as-you-go.

Free credits to start
One API for every model
Webhooks, SDKs & idempotency
No provider account required

Questions? Join our Discord or contact sales.