Mage API · Video model
Wan Video v2.2 API
Open-weights video with a Lightning variant
POST https://api.mage.space/v1/wan_22/generateAt a glance
The Wan Video v2.2 API runs Wan Video v2.2 and 1 other variant through Mage at POST https://api.mage.space/v1/wan_22/generate. A request at the default settings costs 40 Gems (about $0.04), with no subscription. Wan Video v2.2 takes no @handle mentions.
- VideoOutput
- 2Variants
- 40Gems per clip, default
- $0.04About, in USD
Overview
What the Wan Video v2.2 API does
An open-weights video model, from text or a start frame, with a faster Lightning variant. Up to 720p.
Wan Video v2.2, an open-weights video model from text or a start frame, with a Lightning variant.
It accepts first_image as inputs.
Quick start
Call the Wan Video v2.2 API
Set MAGE_API_KEY, submit to /wan_22/generate, and poll status_url until the request completes.
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/wan_22/generate' \
--header "Authorization: Bearer $MAGE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "16:9",
"model_id": "wan22-video"
}' | jq -r '.status_url')
# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';
const mage = new Mage(); // reads MAGE_API_KEY
const request = await mage.run('wan_22', {
prompt: 'A slow push-in on a lighthouse at dusk, waves breaking below',
aspect_ratio: '16:9',
model_id: 'wan22-video',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("wan_22", {
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "16:9",
"model_id": "wan22-video",
})
print(request["result"]["url"])Models
Wan Video v2.2 model_id values
Send model_id to pick a variant. A request without one runs the default.
| model_id | Name | Default |
|---|---|---|
| wan22-video | Wan Video v2.2 | Yes |
| wan22-video-lightning | Wan Video v2.2 |
Options
Wan Video v2.2 parameters
Allowed values across all variants; a variant may offer fewer. The docs list the options per variant.
| Field | Values |
|---|---|
| aspect_ratio | 21:9, 16:9, 3:2, 5:4, 1:1, 4:5, 2:3, 9:16, 9:21 |
| resolution | 240p, 360p, 480p, 720p |
Inputs
Media inputs Wan Video v2.2 accepts
Send each as an https URL, a data URL, or an upload of up to 100 MB.
| Field | Role |
|---|---|
| first_image | The first frame image. |
More video models
Other video generation APIs on Mage
Berry API
Video that stays true to your references
Blueberry API
Pin the first and last frame
Cherry API
Our flagship video family
Grok Video API
Grok Imagine, in motion
Kiwi API
Everyday video, zero setup
Lemon API
Every video feature, at a friendlier price
FAQ
Frequently asked questions
How much does the Wan Video v2.2 API cost?
What is the Wan Video v2.2 API endpoint?
Which Wan Video v2.2 models can I call?
Does Wan Video v2.2 support reference images or characters?
Can I use Wan Video v2.2 from Claude or ChatGPT?
How long are Wan Video v2.2 results kept?
Start building with Mage
One account, one Gems balance, every model. Pay only for what you generate.