Sandbox
@Anil-matcha/Wan-3.0-API

Wan 3.0 video API client and MCP server

This repo wraps the Wan 3.0 video API in a Python SDK and adds an MCP server for agent-capable clients. You can send prompts or reference media, start an async generation job, upload local files, and poll until the video is ready.

78 stars10 forksPythonUpdated 22d ago
How to Access Wan 3.0 API - Best Alternative to Seedance 2
Anil Chandra Naidu Matcha1.7k views • 1 month ago
Who it's for

Builders who want Claude Code, Codex, Cursor, or another MCP client to call Wan 3.0 video generation tools.

What it delivers

You can generate and track AI video jobs from code or an agent without wiring the API yourself.

What it does

Text to video

Creates a video from a text prompt with options for resolution, duration, aspect ratio, audio, and seed.

Image to video

Animates a source image and supports optional end-frame guidance through `last_image`.

Reference to video

Conditions output on up to 10 reference images, 5 reference videos, and 5 reference audios.

File upload

Uploads local reference files for use in generation requests.

Async job polling

Returns a request ID and provides `get_result()` and `wait_for_completion()` for later retrieval.

MCP tool exposure

Runs `mcp_server.py` to expose Wan video actions as MCP tools for compatible clients.

How to get it

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

README

Wan 3.0 API — Python Wrapper

Powered by MuAPI License: MIT Python 3.9+

A focused Python SDK and MCP server for the Wan 3.0 API on MuAPI. It supports text-to-video, image-to-video, multimodal reference-to-video (up to 10 reference images, 5 reference videos, and 5 reference audios), synchronized audio, file upload, and asynchronous job polling.

▶ Watch: How to Access Wan 3.0 API - Best Uncensored Alternative to Seedance 2

Related Projects

Install

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

Set MUAPI_API_KEY in .env. Set WAN_API_BASE_URL only if you use a compatible provider other than the default MuAPI base URL.

Quick start

from wan_api import WanAPI

api = WanAPI()
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)

Image to video

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,
)

Reference to video

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 surface

MethodPurpose
text_to_video()Create a video with synchronized audio from a text prompt.
image_to_video()Animate a source image, with optional end-frame guidance via last_image.
reference_to_video()Condition a video on up to 10 reference images, 5 reference videos, and 5 reference audios.
upload_file()Upload a local reference file.
get_result() / wait_for_completion()Retrieve an asynchronous job's output.

Every method also accepts resolution (480p, 720p, 1080p), duration (2-30 seconds), thinking_mode (deeper reasoning for complex prompts), enable_audio, and seed.

MCP server

Expose Wan tools to MCP-capable clients:

python mcp_server.py

The server provides text_to_video, image_to_video, reference_to_video, and get_task_status tools.

Endpoint compatibility

The client uses the wan3.0-text-to-video, wan3.0-image-to-video, and wan3.0-reference-to-video paths beneath WAN_API_BASE_URL. If your provider names its endpoints differently, pass that provider's compatible base URL or adapt the small client module before use.

License

MIT

Files in the repo

Repository payload7 top-level entries
  • .gitignore
  • LICENSE
  • mcp_server.py
  • pyproject.toml
  • README.md
  • requirements.txt
  • wan_api.py

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k

Open-source auth gateway connecting 1400+ SaaS providers to AI agents through SDK, CLI, MCP, HTTP, and OpenAPI.

5.7k

Open-source 3D architectural editor with a local CLI, MCP tools, and practical workflows for humans and AI agents.

23k
cinderline/
northcinder

Open-source MCP server for comparing products and asking the buyer before purchase.

1.2k