# Wanapis MCP [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/ZXYZZP/wanapis-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 784  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/wanapis-mcp

## Description
MCP server for WanAPIs image and video generation. One key, every model.

## Tools
Capabilities this server exposes over MCP:

- **wanapis_generate_image** — Generate an image with WanAPIs. Returns image URLs directly if it finishes quickly, otherwise a job_id to poll with wanapis_check_task (generation can take 1-5 minutes). Image 2.5 returns an async task_id; quality and resolution are independent and default to low/1k/1 image. Midjourney returns 4 images per call (its 2x2 grid, split). Models: gpt-image-2 (主力模型，同步返回); gpt-image-2-official (异步高清，支持 quality/resolution 分档); seedream-5-0-pro (Seedream 最强，1K/2K 分档); seedream-5-0-lite (Seedream 轻量); seedream-4-5 (Seedream 4.5); nano-banana-pro (Gemini 3 Pro Image，1K/2K/4K); nano-banana-2 (Gemini 3.1 Flash Image); midjourney (一次出 4 张(2x2 四宫格拆分)); gpt-image-2.5-flare (异步；独立质量/分辨率；默认low/1k/1张，按实际消耗结算); gpt-image-2.5-sunburst (异步编辑；支持参考图；默认low/1k/1张，按实际消耗结算)
- **wanapis_generate_video** — Start a video generation. Returns a task_id immediately — video takes ~100s, so poll wanapis_check_task until status is completed. MiniMax H3 defaults to 4 seconds, 768P, 9:16, fast_mode=false and IR enabled; use resolution instead of quality. H3 accepts up to 9 images (reference/first/last frame), 3 reference videos and 3 audio clips; local file paths are uploaded automatically (H3 as opaque assets, Seedance as a temporary signed URL). Models: seedance-2.5 (最新一代，画质与一致性最好); seedance-2.0 (标准版，质量优先); seedance-2.0-fast (速度版，适合草稿); seedance-2.0-mini (最便宜，适合大批量试稿); veo3.1-quality (Google Veo 3.1，4K + 同步音频); veo3.1-fast (Veo 3.1 速度档); veo3.1-lite (Veo 3.1 最低价); kling-v3 (可灵 v3，人物动作最自然); kling-v2-6 (可灵 2.6，性价比档); viduq3 (Vidu Q3); happyhorse-1.0 (阿里 ATH); grok-video (xAI，固定 6 秒); minimax-h3 (4–30秒；2K至多15秒；默认4秒768P、IR开启)
- **wanapis_upload_media** — Upload one local image, video or audio file for H3 or Seedance. H3 returns an opaque asset_id that can be reused; Seedance returns a temporary signed public URL (valid for a few hours). Uploading is free and does not create a generation task.
- **wanapis_regenerate_video** — Create a 2K regeneration from one of your successful 768P MiniMax H3 source tasks. mode=source uses the source task directly when the account/channel enables it. mode=content requires the original final prompt and every original reference material, exactly as submitted; local paths are uploaded automatically. Regeneration is a new paid task; the original generation remains billed.
- **wanapis_optimize_prompt** — Create a standalone H3 prompt-optimization task. The result is text, not a video; poll wanapis_check_task with kind="prompt". It is a separate paid request. When using the returned prompt for a video, set context_ir_enabled=false to avoid a second IR charge.
- **wanapis_check_task** — Check an async generation task. Returns status, progress, billing (reserved/charged/refunded CNY), the real cost once settled, and media URLs or prompt text when done. IMPORTANT: media URLs require your WanAPIs key — opening one in a browser returns 401, so do not hand the raw URL to a user. Pass save_dir to download the files locally instead. H3 billing may remain pending_usage after the result succeeds; the reserved amount is not the final charge. URLs also stop working once the upstream result expires (~24h).
- **wanapis_estimate_cost** — Estimate a generation budget using public live pricing and an assumed group multiplier. This does not determine your key's billing route or final charge. Image 2.5 estimates are tier precharges. H3 with reference media returns a reservation upper bound (reference-video seconds are reserved before verified usage).
- **wanapis_list_models** — List public catalog models with verified MCP adapters, native options and live pricing. Public visibility does not prove your key's permissions or operational availability.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "wanapis-mcp": {
    "command": "npx",
    "args": ["-y","@wanapis/mcp"],
    "env": {
      "WANAPIS_API_KEY": "",
      "WANAPIS_BASE_URL": ""
    }
  }
}
```

**Requires environment variables:** `WANAPIS_API_KEY`, `WANAPIS_BASE_URL` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What @wanapis/mcp does

@wanapis/mcp exposes WanAPIs image and video models as MCP tools. It supports image generation, video task submission, H3 video regeneration, H3 prompt optimization, media uploads, task polling, cost estimation, and model catalog lookup.

Shared inputs such as quality, aspect ratio, and duration are translated for adapters that use different upstream parameters. Models with their own controls retain those native options. The catalog includes adapters for GPT Image 2.5, MiniMax H3, Seedance, Kling, Veo 3.1, and Midjourney.

## How it works

Run the package with npx and provide a WanAPIs API key through the environment. Image and video requests may complete asynchronously. Fast image responses can return media URLs directly; otherwise the generation tool returns a job or task identifier for `wanapis_check_task`.

Video generation returns a `task_id` immediately. The polling tool reports status, progress, billing in CNY, and completed media URLs or optimized prompt text. A `save_dir` value can be used to download completed media locally.

Local H3 media is uploaded automatically and represented by an opaque asset ID. Seedance requires public URLs, so local inputs are sent through a temporary relay and replaced with signed URLs before submission. H3 accepts reference images, first and last frames, reference video, and reference audio. Seedance supports the same broad media categories, subject to its input-combination rules.

## Setup and configuration

Obtain a WanAPIs key from wanapis.com or wanapi.ai, then register the server in an MCP client. A Claude Code command is:

```bash
claude mcp add wanapis --env WANAPIS_API_KEY=sk-xxx -- npx -y @wanapis/mcp
```

For clients using JSON MCP configuration, set `command` to `npx`, pass `-y` and `@wanapis/mcp` as arguments, and place the key in the server's environment. `WANAPIS_BASE_URL` can point the server at a self-hosted gateway instead of the default service.

## Tools and capabilities

- `wanapis_generate_image` submits image requests. GPT Image 2.5 supports independent quality and resolution controls, reference-image editing, and image count; the MCP defaults are low quality, 1k resolution, and one image. Midjourney returns four images per call.
- `wanapis_generate_video` starts video jobs for supported adapters. MiniMax H3 supports up to nine images, three reference videos, and three audio clips, with resolution, duration, ratio, priority, and context IR settings. Seedance supports 4–15 second output and quality mapped to 480p, 720p, or 1080p.
- `wanapis_upload_media` uploads one local image, video, or audio file for H3 or Seedance without creating a generation task or charging an upload fee.
- `wanapis_regenerate_video` creates a paid 2K H3 task from an eligible successful 768P task. Source mode uses the original task; content mode requires the original prompt and reference material.
- `wanapis_optimize_prompt` creates a separately billed H3 text task. Poll its result with `kind: "prompt"`.
- `wanapis_check_task` retrieves progress, billing, output URLs, or optimized prompt text for image, video, and prompt jobs.
- `wanapis_estimate_cost` calculates a budget from public catalog prices and supplied settings. `wanapis_list_models` returns catalog entries, verified adapters, native options, and prices.

## Limitations and notes

Cost estimates are budgets rather than guaranteed final charges. H3 estimates use a reservation upper bound for reference media and can be refunded after verified usage settles. Image 2.5 estimates are tier precharges; reference images, dimensions, and prompt content can change the final amount. Completed task billing and account usage logs are the source for actual charges.

H3 durations range from 4 to 30 seconds, but 2K output is limited to 15 seconds. H3 and Seedance impose limits on media counts and combinations. Seedance signed media URLs last about six hours, so files may need to be uploaded again for delayed submissions. H3 regeneration is a new paid request, and prompt optimization is billed separately. H3 asset IDs cannot be passed to Seedance.

_Full upstream README: https://allmcps.com/mcp/wanapis-mcp/readme_

