MCP and Agent Skills

Give your agent image and video

Already running Claude Code or Codex on WanAPIs? The same key generates images and video — no second account, no second bill. Seedance, Veo, Kling, Midjourney, Seedream and Nano Banana included.

Use WanAPIs in Magpie

Managing Claude Code / Codex with Magpie? Import the WanAPIs endpoints, then enter your API key in Magpie. This public link contains no key or model list.

Add to Magpie
  1. Install Magpie; if the import link does not open the app, install it here.
  2. Click “Add to Magpie”, allow your browser to open the app, and review the WanAPIs endpoints in Magpie.
  3. Enter your WanAPIs API key manually in Magpie, then confirm and save.
  4. In Magpie Agents, select an available model for Claude Code / Codex, then restart the client or open a new session. Keep Magpie running. Real model requests are billed at WanAPIs rates.

Import only prefills configuration; it does not verify a working connection. Clicking this link does not call a model or generate content. Image and video MCP / Skill setup is below.

Magpie setup guide →
Option 1

MCP Server

For clients that speak MCP. Adds eight tools: generate image, generate video, check task, estimate cost, list models, plus H3/Seedance media upload, H3 2K regeneration and prompt optimization.

claude mcp add wanapis \
  --env WANAPIS_API_KEY=sk-xxx \
  -- npx -y @wanapis/mcp
Option 2

Agent Skill

Nothing to install. Unzip into your agent's skills directory — it calls the HTTP API directly, with no dependencies. For agents without MCP support, or when you would rather not run a second process.

Download wanapis-media.zip

SKILL.md · scripts/wanapis.mjs · reference/models.md

Option 3

Codex plugin

For the Codex desktop app and CLI. It shows up as a proper entry in the plugin list, toggleable, with no config file to hand-edit.

codex plugin marketplace add ZXYZZP/wanapis-mcp
codex plugin add wanapis-media@wanapis

In the desktop app: Settings → Integrations → Plugins.

Client setup

Claude Code

One line, then restart.

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

Codex

Codex uses TOML, not JSON. This writes it into ~/.codex/config.toml for you.

codex mcp add wanapis \
  --env WANAPIS_API_KEY=sk-xxx \
  -- npx -y @wanapis/mcp

Cursor / Windsurf

Add to the MCP config file.

{
  "mcpServers": {
    "wanapis": {
      "command": "npx",
      "args": ["-y", "@wanapis/mcp"],
      "env": { "WANAPIS_API_KEY": "sk-xxx" }
    }
  }
}

Skill (any agent with Skills support)

Unzip into your skills directory and set the API key. Claude Code reads .claude/skills/.

unzip wanapis-media.zip -d .claude/skills/
export WANAPIS_API_KEY=sk-xxx

node .claude/skills/wanapis-media/scripts/wanapis.mjs \
  video "a paper plane over a city at dusk" \
  --model seedance-2.0-mini --quality low --seconds 5 --out clip.mp4

Know the cost before you generate

A single clip ranges from cents to several dollars. Estimates read the public price feed and are a budget, not the final invoice: H3 reference media is reserved at the protocol upper bound and settles to verified usage, and billing may remain pending until that settlement.

seedance-2.0-mini   480p × 5s   →   0.6975
kling-v2-6          720p × 5s   →   1.6745
gpt-image-2         1K          →   0.1200

Models covered

Call wanapis_list_models or run the Skill command below for the gateway’s current image and video models, defaults and pricing tiers. Choose an entry with generatable set to true. New models using a supported protocol appear automatically.

node scripts/wanapis.mjs models --kind video

Machine-readable discovery endpoints

Point Claude Code, Codex, Cursor or any custom agent to these endpoints for zero-auth discovery of live prices, model specs, OpenAPI schemas and MCP metadata.

Every model page also ships a clean Markdown twin at /model/<slug>.md (e.g. /model/seedance-2-5-flash.md, /model/seedream-5-5.md, /model/claude-opus-5-5.md).

You will need an API key

Sign up and get starter credit — enough to try every model above.