Skip to main content
Glama
Anil-matcha

Wan 3.0 Prime API MCP Server

by Anil-matcha

Wan 3.0 Prime API — Python 封装器

Powered by MuAPI License: MIT Python 3.9+

一个面向 MuAPI 上 Wan 3.0 Prime API 的 Python SDK 和 MCP 服务器——这是 Wan 3.0 的高保真层级,以更高的每秒价格支持更锐利的细节和更稳定的运动。它支持文生视频、图生视频、多模态参考生视频(最多 10 张参考图像、5 个参考视频和 5 个参考音频)、同步音频、文件上传和异步任务轮询。

相关项目

Related MCP server: NoLang MCP Server

安装

git clone https://github.com/Anil-matcha/Wan-3.0-Prime-API.git
cd Wan-3.0-Prime-API
pip install -r requirements.txt
cp .env.example .env

.env 中设置 MUAPI_API_KEY。仅当使用非默认 MuAPI 基础 URL 的兼容提供商时,才设置 WAN_PRIME_API_BASE_URL

快速开始

from wan_api import WanPrimeAPI

api = WanPrimeAPI()
job = api.text_to_video(
    "A cinematic tracking shot of a red fox crossing a snowy forest at sunrise",
    resolution="720p",
    aspect_ratio="16:9",
    duration=5,
)

result = api.wait_for_completion(job["request_id"])
print(result)

图像转视频

job = api.image_to_video(
    prompt="The subject turns toward camera as a gentle breeze moves their hair.",
    image_url="https://example.com/reference.jpg",
    aspect_ratio="9:16",
    duration=5,
)

参考转视频

job = api.reference_to_video(
    prompt="The person from the reference image walks into the room shown in the reference video.",
    images_list=["https://example.com/character.jpg"],
    videos_list=["https://example.com/room.mp4"],
    resolution="720p",
    duration=5,
)

API 概述

方法

用途

text_to_video()

通过文本提示创建带同步音频的高保真视频。

image_to_video()

让源图像动起来,可选用 last_image 指定结束帧。

reference_to_video()

以最多 10 张参考图像、5 个参考视频和 5 个参考音频为条件生成视频。

upload_file()

上传本地参考文件。

get_result() / wait_for_completion()

获取异步任务的输出。

每个方法也接受 resolution480p720p1090p)、duration(2–30 秒)、thinking_mode(针对复杂提示进行更深入的推理)、enable-audiosee

Wan 3.0 Prime 与标准 Wan 3.0 的对比

Wan 3.0 Prime 暴露与标准 Wan 3.0 完全相同的请求结构——在文生视频、图生视频和参考生视频中,promptresolutionaspect_ratiodurationthinking_modeenable-audiosee 参数都相同——只是指向 wan3.0-prime-* 端点而非 wan3.0-*。请将其用于 Hero化内容、客户交付物和营销活动成片,在这些场景中,更锐利的细节和运动一致性值得更高的费率;日常生成请使用 Wan-3.0-API

MuAPI 指示性定价(按输出秒计费,以分辨率和时长为结算单位):

| 分辨率 | Wan 3.0 (standard) | Wan 3.0 Prime | | ------------------- | ------- --------- | ------- ------ | | 480p | $0.05/sec | $0.068/sec | | 720p | $0.10/sec | $0.14/sec | | 108p0 | 0.20/sec | $0.28/sec |

MCP 服务器

请将 Wan Prime 工具暴露给支持 MCP 的客户端:

python mcp_server.py

该服务器提供 text_to_videoimage_to_videoreference_to_videoget_task_status 工具。

端点兼容性

客户端使用 WAN_PRIME_API_BASE_URL 下的 wan3.0-prime-text-to-videowan3.0-prime-image-to-videowan3.0-prime-reference-to-video 路径。如果您的提供商以不同方式命名端点,请传入该提供商兼容的基础 URL,或在使用前调整这个小巧的客户端模块。

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server for Wan AI video generation

  • MCP server for Google Veo AI video generation

  • MCP server for Kling AI video generation

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Anil-matcha/Wan-3.0-Prime-API'

If you have feedback or need assistance with the MCP directory API, please join our Discord server