mcp
v0.2.0MCP server for WanAPIs image and video generation.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
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). Use wanapis_list_models for current image model IDs, options and defaults.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | What to generate. |
aspect | string | Aspect ratio supported by the selected model. |
count | integer | Number of images where supported. |
model | string | |
quality | string | Quality tier accepted by the selected model. |
reference_images | array | Image URLs for image-to-image. |
resolution | string | Resolution from the model capabilities. |
size | string | Image size where supported. |
wanapis_generate_video
Start a video generation. Returns a task_id immediately — video takes ~100s, so poll wanapis_check_task until status is completed. Use wanapis_list_models for current video model IDs, options and reference-media limits.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | |
aspect | string | Output aspect ratio. |
context_ir_enabled | boolean | H3 IR, default true; adds a per-request fee. |
fast_mode | boolean | H3 priority mode, default false; doubles the video fee. |
first_frame | string | H3/Seedance explicit first-frame image (URL/data/local path). |
generate_audio | boolean | Seedance audio toggle. Muse always includes sound, so omit or pass true. |
image_url | string | Legacy single opening-frame/reference image URL. Use reference_images for multiple inputs. |
last_frame | string | H3/Seedance explicit last-frame image (URL/data/local path). |
model | string | |
quality | string | Quality tier where supported. |
ratio | string | Alias for aspect when supported by the model. |
reference_audio | array | H3/Seedance reference audio (URL/local path; H3 also accepts data/asset_id). Up to 3. |
reference_images | array | Muse: up to 9 image URLs, image data URIs or base64 images (11 MiB total, URLs must be publicly accessible). H3 and Seedance also accept local paths. H3 accepts asset_id. |
reference_videos | array | H3/Seedance reference videos (URL/local path; H3 also accepts data/asset_id). Up to 3. |
resolution | string | Resolution from the model capabilities. |
return_last_frame | boolean | Seedance: include the last frame URL in the result. |
seconds | number | Requested video duration. Use the bounds and default from wanapis_list_models. |
seed | integer | Seedance: randomness seed. |
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.
| Parameter | Type | Description |
|---|---|---|
media_type * | string | |
path * | string | Local file path. |
binding_asset_id | string | H3 only: optional existing asset_id whose channel/credential this upload should reuse. |
model | string | Target model; default minimax-h3. Use a seedance-* model to get a temporary public URL instead of asset_id. |
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.
| Parameter | Type | Description |
|---|---|---|
source_task_id * | string | Your public WanAPIs task ID of a successful 768P minimax-h3 original. |
first_frame | string | |
last_frame | string | |
mode | string | |
prompt | string | content mode only: the original final prompt. |
reference_audio | array | |
reference_images | array | content mode: the original reference images. |
reference_videos | array |
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.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | |
ratio | string | Planned video ratio, default 9:16. |
seconds | number | Planned video duration 4–15, default 4. |
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: gateway video proxy URLs (/v1/videos/.../content) require your WanAPIs key — opening one in a browser returns 401 — whereas async image tasks return public upstream CDN URLs directly. Pass save_dir to download files locally before upstream links expire (~24h). H3 billing may remain pending_usage after the result succeeds; the reserved amount is not the final charge.
| Parameter | Type | Description |
|---|---|---|
task_id * | string | |
kind | string | |
save_dir | string | Directory to download finished media into. Use this to give the user a real file — the URLs alone are not shareable. |
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).
| Parameter | Type | Description |
|---|---|---|
model * | string | |
aspect | string | |
context_ir_enabled | boolean | H3 only, default true. |
count | integer | Number of images where supported. |
fast_mode | boolean | H3 only, default false. |
first_frame | string | |
generate_audio | boolean | Generate audio where supported. |
group_ratio | number | Budget assumption only; default 1. Does not change the generation group or billing. |
image_url | string | Legacy single image; H3 sends one input_reference object. |
last_frame | string | |
quality | string | Quality tier where supported. |
ratio | string | |
reference_audio | array | H3 reference audio; no material fee. |
reference_images | array | Muse reference images, up to 9. H3 images/frames for the reservation estimate. Image 2.5 references can increase actual usage. |
reference_videos | array | H3 reference videos; the estimate reserves the protocol input upper bound. |
resolution | string | Resolution from the model capabilities. |
seconds | number | Requested video duration in seconds. |
size | string |
wanapis_list_models
List gateway-published media models, execution support, parameters and live prices.
| Parameter | Type | Description |
|---|---|---|
kind | string |