Wan 3.0 Prime API MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Wan 3.0 Prime API MCP Servercreate a 5s 720p 16:9 video of a paper kite over a coastal town at golden hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Wan 3.0 Prime API — from $0.051/s (480p)
Alibaba Wan 3.0 Prime is live on ArgoLink: $0.051/s at 480p, $0.11/s at 720p and $0.21/s at 1080p, 21–25% below Alibaba Cloud's international list price. Prime is the faster lane of Wan 3.0: a prompt, optionally with reference images, clips and audio, becomes a 4–30 second video with its own soundtrack.
Wan 3.0 Prime model page → · Prices · Install · Prime vs Wan 3.0 · MCP server · FAQ
A small Python client (wan_api.py), an MCP server for agent tools (mcp_server.py), curl scripts in examples/ and offline tests. It speaks the async /v1/videos protocol: submit, poll, download.
Last checked: 2026-10-07 against the pages linked in the tables.
At a glance
Model ID |
|
Modes | text to video · reference to video (images, video, audio). No first or last frame and no video edit on this route |
Duration | 4–30 s in whole seconds, default 5 |
Resolution | 480p · 720p · 1080p, default 720p |
Aspect ratio | 16:9 · 1:1 · 9:16, default 16:9 |
References | ≤ 10 images, ≤ 5 videos, ≤ 5 audio clips, ≤ 20 in total. Clips 1–15 s each and 15 s per kind; output plus reference video ≤ 30 s. Audio needs an image or video beside it |
Prompt | required, up to 20,000 characters; name assets |
Sound | always on (AAC stereo); |
Output | one 24 fps H.264 MP4 per request |
Rejected with 400 |
|
Related MCP server: AI-video-generator-MCP
Price per second
Provider | 480p | 720p | 1080p | 10 s at 720p |
$0.051 | $0.11 | $0.21 | $1.10 | |
Alibaba Cloud Model Studio, Singapore (international) | $0.068 | $0.14 | $0.28 | $1.40 |
Alibaba Cloud Model Studio, US (Virginia) and other global regions | $0.0636 | $0.1272 | $0.2544 | $1.27 |
$0.075 | $0.15 | $0.30 | $1.50 | |
$0.068 | $0.14 | $0.28 | $1.40 |
All pages read 2026-10-07 (the Alibaba page was last updated 2026-09-28 and shows list prices without promotions). Against the Singapore list the ArgoLink rate is 25% lower at 480p and 1080p and 21% lower at 720p; against the global-region list it is 20%, 14% and 17% lower.
Install
git clone https://github.com/augustusrenfield6/wan-3-0-prime-api
cd wan-3-0-prime-api
python -m pip install -e . # client: Python 3.9+, requests
python -m pip install -e ".[mcp]" # adds the MCP server: Python 3.10+, mcp 2.x
export WAN_API_KEY=your-key # an ArgoLink API keyWAN_BASE_URL (default https://argolink.io/v1) points the client at any other server with the same protocol.
Quick start
from wan_api import WanPrimeAPI, estimate_cost
api = WanPrimeAPI()
job = api.text_to_video(
"A cinematic tracking shot of a red fox crossing a snowy forest at sunrise, breath steaming",
duration=8,
resolution="720p",
aspect_ratio="16:9",
)
result = api.wait_for_completion(job["request_id"], on_progress=lambda s: print(s.get("progress"), "%"))
api.download(job["request_id"], "fox.mp4")
print(result["usage"], estimate_cost(8, "720p")) # 8 billed seconds, $0.88Reference to video
job = api.reference_to_video(
"The woman in @Image 1 walks into the café from @Video 1 and orders, in time with @Audio 1",
reference_images=["https://example.com/woman.jpg"],
reference_videos=["https://example.com/cafe-6s.mp4"],
reference_audios=["https://example.com/voice.mp3"],
duration=10,
aspect_ratio="9:16",
)
# billed seconds = 10 output + 6 reference video = 16 -> 16 x $0.11 = $1.76 at 720pLocal files go through a free upload ticket first:
media = api.upload_file("woman.jpg", kind="image") # PUTs to a signed URL, no bearer token
job = api.reference_to_video("@Image 1 waves at the camera", reference_images=[media["media_url"]])Upload limits: JPEG or PNG up to 20 MiB; MP4 or MOV up to 100 MiB and 1–15 s; WAV or MP3 up to 15 MB and 1–15 s. The upload_url is valid for 15 minutes and the media_url for seven days.
API surface
Method | Does |
| submit a prompt-only job, return |
| submit with HTTPS references |
| upload a local asset, return its |
| read the status once |
| poll until |
| stream the MP4 to |
| dollars at the rates above |
| raises: frames are not accepted on |
Every method validates locally first (ratio, duration, tier, counts, HTTPS URLs), so a bad request fails before it reaches the API. Submits are never retried by the client: a POST that timed out may still have created a job, so poll before you resend.
curl
BASE=https://argolink.io/v1
ID=$(./examples/submit-text.sh "Paper lanterns rise over a river at dusk" 6 720p 16:9)
./examples/poll-and-download.sh "$ID" lanterns.mp4submit-reference.sh and upload-and-submit.sh cover references; all four scripts need curl and jq.
Wan 3.0 Prime vs Wan 3.0
Both are Alibaba Wan 3.0 on the same endpoint; the model ID picks the lane.
|
| |
Positioning | faster turnaround | full feature set |
Duration | 4–30 s | 2–30 s |
First / last frame | not on this route (400) | yes |
Edit an existing video | no | yes ( |
Aspect ratios | 16:9, 1:1, 9:16 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, adaptive |
Audio as the only reference | no | yes |
| rejected | accepted |
Silent output | no |
|
Price 480p / 720p / 1080p | $0.051 / $0.11 / $0.21 | $0.038 / $0.075 / $0.15 |
Alibaba Cloud's own Prime documentation lists first-frame and first/last-frame input; the wan-3-prime route described here does not accept them, so send frames to wan-3.
MCP server
mcp_server.py runs over stdio and exposes text_to_video, reference_to_video, get_video_status, download_video and price_table. It reads WAN_API_KEY from its own environment and never takes a key as a tool argument.
Claude Code:
claude mcp add --transport stdio --env WAN_API_KEY=your-key wan-3-prime -- python /path/to/wan-3-0-prime-api/mcp_server.pyCursor (.cursor/mcp.json or ~/.cursor/mcp.json):
{
"mcpServers": {
"wan-3-prime": {
"command": "python",
"args": ["/path/to/wan-3-0-prime-api/mcp_server.py"],
"env": { "WAN_API_KEY": "${env:WAN_API_KEY}" }
}
}
}Codex (~/.codex/config.toml):
[mcp_servers.wan-3-prime]
command = "python"
args = ["/path/to/wan-3-0-prime-api/mcp_server.py"]
env_vars = ["WAN_API_KEY"]The server needs the MCP Python SDK 2.x. In 1.x the class was FastMCP (mcp.server.fastmcp), which 2.x renamed to MCPServer.
Billing rules
Per output second at the tier rate, multiplied by the length.
Reference video seconds are added, with the fraction of their total dropped: 5 s output with a 2.4 s clip bills 7 s.
Reference images and audio are free; uploads are free.
A failed, rejected or expired job is not billed. The finished job's
usageholdsoutput_seconds,reference_video_secondsandbilled_seconds.
Status values
pending (with progress 0–99 and, once known, estimated_seconds_remaining), done (with video.url and usage), failed (with error.code, error.message, error.retryable) and expired. The content endpoint answers 409 job_video_not_ready until the job is done and 424 job_failed after a failure.
FAQ
Can Wan 3.0 Prime start from my image?
Not as a first frame on this route: start_image and end_image return 400. Pass the image as reference_images (it guides the subject without being frame one), or use wan-3 for true first-frame and first/last-frame videos.
Why is 4:3 or adaptive rejected?
Prime accepts 16:9, 1:1 and 9:16 only. wan-3 adds 21:9, 4:3, 3:4 and adaptive.
Can I get a silent clip?
No, every Prime video carries a generated stereo track. Remove it afterwards with ffmpeg -i in.mp4 -an -c:v copy out.mp4, or use wan-3 with generate_audio: false.
What does a 30-second 1080p Prime clip cost? 30 × $0.21 = $6.30 here, against $8.40 at Alibaba Cloud's Singapore list price.
How long can a reference clip be? 1–15 s each and 15 s in total, and the output plus the reference videos may not exceed 30 s.
The old example used running and api.argolink.io. Which is right?
Neither: the documented statuses are pending, done, failed and expired, and the base URL is https://argolink.io/v1.
Tests
python -m pip install -e ".[test]" # add ",mcp" to also run the MCP server test
python -m pytestThe tests use a fake HTTP session; no key or network is needed.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP tools for FFmpeg-style video and audio processing through FFMPEG API.
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Transcode, host and caption video from a prompt. Fifteen tools, nine read-only, nothing deletes.
- RendobarOAuthcom.rendobar
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables programmatic video generation via the json2video API, supporting scene and element creation, status polling, and template management.527 npm26MIT
- FlicenseAqualityBmaintenanceEnables AI agents to generate videos from text prompts, monitor job status, retrieve completed videos, and cancel ongoing generation tasks through stdio-based MCP tools.4-
- AlicenseAqualityAmaintenanceEnables MCP-compatible agent hosts to interact with TypeSafe AI's Jev System One API through dependency-free STDIO tools for classification, scoring, verification, gating, routing, review, and health checks.924 PyPIMIT
- AlicenseNot gradedqualityCmaintenanceExposes four stdio tools that let an agent research an application's documented interface, produce a validated single-use plan, and execute read-only operations against public HTTP JSON APIs, static HTML/JSON/text sources, and host-configured CLIs. Runs in-process with no listening port, accounts, or model dependency, returning bounded results while keeping inputs and outputs inside a host-enforced research-plan-execute lifecycle.MIT